Buwanang Archive: Nobyembre 2007

Moss ay nagsasabi sa Akin Aking Mga Haligi Pangalan ay Nakalaan o Sa Paggamit … Ngunit Ito ay Hindi

I-UPDATE 12/04/07: Tingnan this Microsoft KB (http://support.microsoft.com/kb/923589) para sa mga kaugnay na impormasyon.

Talaga, ito lumiliko out ito ay, pero tricksy MOSS had to make it difficult.

My customer does some development work on his MOSS site over the weekend. It’s a bit of a jumble as to what he actually did, subalit ang resulta ay ito:

  • He tries to add a site column called "Quantity" and MOSS replies: "The column name that you entered is already in use or reserved. Choose another name."
  • He attempts to add it to another environment and that works. Samakatwid, "Quantity" is not a reserved name.
  • He tries to find an existing site column named "Quantity" in that site collection. He cannot find it.

I did some research, and even some coding, waxed philosophical and finally found that a column named Quantity did, sa katunayan, exist. It was in the "_Hidden" group. Hence, we could not find it via the SharePoint user interface.

How did it get there? I do not know, but I have a theory (or as my wife would call it, "blah blah blah"). Sa isang lugar sa kahabaan ng linya, isang fabulous forty template was added and probably activated at a site in the site collection. It was then deactivated (or the site removed). The site column, gayunman, remained but in the "_Hidden" group. If someone knows better, please let me know via email or post in the comments.

SharePoint was telling the truth. It’s hardly worth pointing out that that message is not as helpful as it could be. It would be nice to see that message fork into two different messages in the future: 1) Say that the column name is reserved or it is not. 2) If it’s not reserved, show the site, or at least the group, where the column name is already used.

</dulo>

OM Kasalukuyan Data Via ng isang Custom Listahan (o, Pa isa pang OM Data Displayor [tulad ng YACC, ngunit iba't-ibang])

Ngayon, I spent a handful of hours tracking down the root cause behind the message "The column name that you entered is already in use or reserved. Choose another name."

Ang haligi na pinag-uusapan malikha, natanggal at muling nilikha sa isa pang kapaligiran, so I knew it wasn’t a reserved name. Gayunman, Ko lang hindi mahanap ang haligi sa kahit saan sa pamamagitan ng standard na interface ng gumagamit SharePoint sa anumang site sa koleksyon site.

I-post sa MSDN forums dito at ang matigas Andrew Woodward may tulis sa akin sa direksyon ng ang kalakip na data object modelo.

Nagpunta ako sa off codeplex upang mahanap ang ilang mga tool na makakatulong sa akin sa Peer ang kalakip na data ng OM at makakatulong sa akin mahanap ang problema.

Sinubukan kong ilang mga tool at sila ay napaka-cool na kawili-wili at ngunit sa pagtatapos, the UI wasn’t good enough for my purpose. I’m not criticizing them by any means, ngunit malinaw na ang tool-makers ay hindi ang aking mga problema sa isip kapag sila ay nilikha kanilang UI :). Most people seem to be investing a fair amount of time and effort in creating workstation / client application na nagbibigay ng mga tanawin puno, right-click context menus and so forth. These are nice and all, ngunit ito ay isang pulutong ng trabaho upang lumikha ng isang top-of-the-line na karanasan ng gumagamit na din ang napaka-kakayahang umangkop.

Ko talagang kinakailangan ng sagot sa problemang ito. Ito ay naganap sa akin na kung maaari ako makakakuha ng lahat ng mga haligi site sa koleksyon site sa isang pasadyang listahan, Kaya kong i-filter, uri-uriin at lumikha ng mga tanawin na nais makatulong sa akin mahanap ito parang umiiral na hanay (saan ito ginawa, BTW). I went ahead and did that and an hour or two later, ay ang lahat ng aking site hanay load sa isang pasadyang listahan sa pagsasama, sorting and so forth. I found my answer five minutes later.

Kung at kapag ako ay matagumpay na sakupin ang mundo, I think I will decree that all SharePoint tools providers must seriously consider surfacing their object model data in a custom list. That way, Mayroon akong ang lakas upang maghanap ng kahit anong paraan na gusto ko (napilitan, mangyari pa, sa pamamagitan ng standard na mga tampok sharepoint).

SharePoint Designer workflow Custom Action — Pagmamasid Tungkol sa <Designer Uri ng Patlang Tie =”StringBuilder” … />

Lamang ng isang mabilis na obserbasyon na may isang mahalagang pagkakaiba sa pagitan ng mga dalawang kahulugan:

<FieldBind Field = "InParam1" Designer type = "String Builder" Id = "2" Text = "parameter ng Input # 1" />

laban sa:

<FieldBind Field = "InParam1" Id = "2" Text = "parameter ng Input # 1" />

Ang unang mga palabas tulad nito sa SPD:

imahen

habang ang huli ay nagpapakita tulad nito:

imahen

I’m not sure how helpful these screen shots are but I put in the effort to make them so you have to view them 🙂

Pagmamasid ang mga ito: StringBuilder nagpapahintulot sa iyo na bumuo ng isang string (nang walang alinlangan) sa pamamagitan ng paghahalo-sama mga mga string literals at mga workflow data (sa pamamagitan ng "Magdagdag ng Lookup" pindutan sa mas mababa sa kaliwa sulok). When you use the Add Lookup button, ito pagsingit ng isang token sa form "[%token%]". When SharePoint invokes your custom action, (C # code sa aking mga kaso), SharePoint ipinapasa ang token mismo, not the value of the token. If you use the default designer type (ang ikalawang uri), SharePoint lumalaki ang token at magbabalik ng aktwal na halaga ng token sa iyong aksyon.

StringBuilder = Bad, default na uri ng designer = Magandang.

Talaga, that’s not what I really mean. Just don’t try and pass a parameter to your custom action when the designer type = StringBuilder. Use the default designer type and chain a StringBuilder to it up front if you need to build complex strings in your workflow (na hindi sinasadya ay kung ano mismo ang isa upang lumikha ng isang dynamic na paksa para sa ang email na aksyon, ngunit na ang isang paksa para sa isa pang blog entry, ay naging).

<katapusan />

Napaaga workflow Activation — Ang isang Non-medikal Solusyon

I-UPDATE: Tingnan ang MSDN talakayan, lalo na ang huling entry: http://forums.microsoft.com/MSDN/showpost.aspx?postid=2631057&siteid=1. It describes a condition that may short circuit this whole thing. In short, Maaaring ito ay kasing simple ng paggawa ng hindi bababa sa isa sa mga ipinag-uutos na mga patlang.

Mayroon akong isang library dokumento na sumusuporta sa walong mga uri ng nilalaman.

I have a SharePoint Designer workflow that wants to calculate and assign a "reminder date" by simply subtracting 30 days from another column, "due date". This should only happen for one of the content types, "Insurance". The business objective is to produce a KPI that shows two categories of insurance documents: "about to expire" and "expired." (You can read more about this kind of KPI and more substantial drill-down dito).

I have configured the workflow to fire when a new item is created and when an item is modified. The idea is that when an insurance document is uploaded, we calculate a "warning date" based on the expiration date. A pair of views work in connection with a KPI List to highlight these conditions when users hit their home page.

This strategy does not work when I upload a document.

I upload the document and I am presented with the meta data entry screen. Sa puntong ito, I’m already in trouble. SharePoint has already, prematurely from my perspective, fired the workflow. I haven’t had a chance to pick the correct content type nor assign a due date. Sa parehong oras, the workflow does not fire when I hit the submit button at this time. There’s some built-in logic that "believes" that first submit is part of the "create" event. Kaya … my workflow has fired and when it executed, it was passed default meta data values.

The best work-around I know of is to insert a "pause until" activity in the workflow. I have the workflow pause for 1 minute. While it’s pausing, I select the correct content type, enter the meta data and submit. The pause completes and the workflow proceeds as needed. (Note that in my environment, timer workflow activities from SPD do not work out of the box. You may have the same trouble. Tingnan dito for more details).

I don’t like "magic delay" work-around. What happens if the user uploads a document and the phone rings and the ensuing conversation outlasts the pause? I can make the pause longer, but I still don’t like it.

I wrote about this on the MSDN forums here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2430725&SiteID=1

SharePoint Security Fundamentals Unang / Iwasan ang mga karaniwang Pitfalls

I-UPDATE 12/18/07: Tingnan Paul Liebrand ng artikulo para sa ilang mga teknikal na mga kahihinatnan ng pag-alis o pagbabago ng default na pangalan ng grupo (tingnan ang kanyang mga komento sa ibaba pati na rin).

Pangkalahatang-ideya ng:

SharePoint security is easy to configure and manage. Gayunman, it has proven to be difficult for some first-time administrators to really wrap their hands around it. Not only that, I have seen some administrators come to a perfect understanding on Monday only to have lost it by Friday because they didn’t have to do any configuration in the intervening time. (Umamin ako sa pagkakaroon ng problemang ito sa aking sarili). This blog entry hopefully provides a useful SharePoint security primer and points towards some security configuration best practices.

Mahalagang Paunawa:

This description is based on out of the box SharePoint security. My personal experience is oriented around MOSS so there may be some MOSS specific stuff here, but I believe it’s accurate for WSS. I hope that anyone seeing any errors or omissions will point that out in comments or email sa akin. I’ll make corrections post haste.

Fundamentals:

Para sa mga layunin ng pangkalahatang-ideya na ito, mayroong apat na pangunahing mga aspeto upang seguridad: user / group, securable bagay, mga antas ng pahintulot at mana.

Mga gumagamit at mga Grupo masira sa:

  • Indibidwal na mga gumagamit: Nakuha mula sa mga aktibong direktoryo o nilikha nang direkta sa SharePoint.
  • Groups: Mapped directly from active directory or created in SharePoint. Groups are a collection of users. Groups are global in a site collection. They are never "tied" sa isang tiyak na securable bagay.

Securable bagay masira sa hindi bababa sa:

  • Mga site
  • Dokumento library
  • Indibidwal na mga item sa listahan at dokumento aklatan
  • Folder
  • Iba't ibang mga setting ng BDC.

May iba pang mga bagay securable, ngunit makuha mo ang mga larawan.

Pahintulot ng mga antas: Ang isang bundle ng mga butil-butil / low level access rights that include such things as create/read/delete entries in lists.

Pamana: By default entities inherit security settings from their containing object. Sub-sites inherit permission from their parent. Document libraries inherit from their site. So on and so forth.

Mga user at pangkat nauugnay sa securable bagay sa pamamagitan ng mga antas ng pahintulot at mana.

Ang Karamihan Mahalaga Security Panuntunan Upang Intindihin, Ever 🙂 :

  1. Groups ay mga simpleng mga koleksyon ng mga gumagamit.
  2. Groups ay global sa loob ng isang koleksyon site (i.e. walang ganoong bagay bilang isang grupo na tinukoy sa isang antas site).
  3. Ang pangalan ng grupo ay hindi withstanding, mga pangkat ay hindi, in at ng kanilang mga sarili, have any particular level of security.
  4. Groups have security in the context of a specific securable object.
  5. Maaari kang magtalaga ng iba't ibang mga antas ng pahintulot sa parehong group para sa bawat securable bagay.
  6. Web application patakaran tramp ang lahat ng ito (tingnan sa ibaba).

Seguridad ng mga administrator nawala sa isang dagat ng pangkat at mga listahan ng gumagamit ay maaaring laging umaasa sa mga axioms upang pamahalaan at maunawaan ang kanilang seguridad configuration.

Mga Karaniwang Pitfalls:

  • Grupo ng mga pangalan ng maling magpahiwatig pahintulot: Sa labas ng kahon sa, SharePoint defines a set of groups whose names imply an inherent level of security. Consider the group "Contributor". One unfamiliar with SharePoint security may well look at that name and assume that any member of that group can "contribute" to any site/list/library in the portal. That may be true but not because the group’s name happens to be "contributor". This is only true out of the box because the group has been provided a permission level that enables them to add/edit/delete content at the root site. Through inheritance, the "contributors" group may also add/edit/delete content at every sub-site. One can "break" the inheritance chain and change the permission level of a sub-site such that members of the so-called "Contributor" grupo ay hindi maaaring mag-ambag sa lahat, ngunit lamang basahin (halimbawa). This would not be a good idea, nang walang alinlangan, dahil magiging lubhang nakalilito.
  • Groups ay hindi natukoy sa isang antas site. It’s easy to be confused by the user interface. Microsoft provides a convenient link to user/group management via every site’s "People and Groups" link. It’s easy to believe that when I’m at site "xyzzy" and I create a group through xyzzy’s People and Groups link that I’ve just created a group that only exists at xyzzy. That is not the case. I’ve actually created a group for the whole site collection.
  • Grupo ng pagiging miyembro hindi nag-iiba ayon sa site (i.e. ito ay pareho sa lahat ng dako ang grupo ay ginamit): Consider the group "Owner" at dalawang mga site, "HR" and "Logistics". It would be normal to think that two separate individuals would own those sites — an HR owner and a Logistics owner. The user interface makes it easy for a security administrator to mishandle this scenario. If I didn’t know better, Maaari ko ma-access ang mga tao at mga Grupo sa pamamagitan ng mga link sa site HR, select the "Owners" group and add my HR owner to that group. A month later, Logistics comes on line. I access People and Groups from the Logistics site, add pull up the "Owners" group. I see the HR owner there and remove her, thinking that I’m removing her from Owners at the Logistics site. Sa katunayan, I’m removing her from the global Owners group. Hilarity ensues.
  • Bagsak upang pangalanan ang pangkat batay sa mga tiyak na papel: The "Approvers" group is a perfect example. What can members of this group approve? Where can they approve it? Do I really want people Logistics department to be able to approve HR documents? Of course not. Always name groups based on their role within the organization. This will reduce the risk that the group is assigned an inappropriate permission level for a particular securable object. Name groups based on their intended role. In the previous HR/Logistics scenario, Ang dapat kong nalikha dalawang bagong mga grupo: "HR Owners" and "Logistics Owners" at magtalaga ng makabuluhang mga antas ng pahintulot para sa bawat isa at ang minimum na halaga na kinakailangan para sa mga gumagamit na iyon upang gawin ang kanilang mga trabaho.

Iba pang kapaki-pakinabang na sanggunian:

Kung nagawa mo na ito ito malayo:

Please let me know your thoughts via the comments or email me. If you know other good references, mangyaring gawin ang parehong!

Technorati Tags:

Mabilis at madali: Lumikha ng isang Data Tingnan ang Web Bahagi (DVWP)

Mayroong isang kayamanan ng mahusay na impormasyon sa mga WSS 3.0 Data Tingnan ang Web Bahagi (DVWP) on the web from several sources. Gayunman, I found it to be surprisingly difficult to find information on this first very basic step. Here is another article in the "quick and easy" serye upang tugunan ito.

Follow these steps to create a data view web part (DVWP). They are based on an "Announcements" web part, but apply to most lists.

  1. Create an Announcements web part and add it to a site.
  2. Open the site in SharePoint Designer.
  3. Open the site’s default.aspx.
  4. Select the Announcements web part and right-click.
  5. From the context menu, select "Convert to XSLT Data View".

SharePoint Designer notifies you that this site is now customized from its site definition. That’s not necessarily bad, but there are important implications (performance, upgrade, mga iba) which are beyond the scope of this little "Quick and Easy" pagpasok. To get more information on this subject, I recommend both books dito as well as your favorite Internet search.

Confirm that you did it correctly:

  1. Close and re-open the web browser (to avoid accidentally re-posting the original "add a new web part").
  2. Select the web part’s arrow drop-down and choose "Modify Shared Web Part" from the menu.
  3. The tool panel opens to the right.
  4. The panel has changed from its usual set options to this:
imahen

“Hindi makakuha ng mga listahan ng schema haligi ari-arian mula sa listahan ng SharePoint” — paglalarawan / work-arounds

Sa linggong ito, namin sa wakas ay muling ginawa ng problema na ay iniulat sa pamamagitan ng isang remote user: Kapag siya sinubukan upang i-export ang mga nilalaman ng isang listahan sa excel, mga bagay na gusto tila upang simulan ang nagtatrabaho, ngunit pagkatapos Excel nais magpa-pop up ang isang error: "Cannot get the list schema column property from the SharePoint list". She was running office 2003, windows XP and connecting to MOSS.

Hinanap ko ang Internets at nakita ang ilang mga haka-haka ngunit walang anuman 100% definitive. Hence, ang post na ito.

Ang problema: Ine-export ng tanawin sa excel na naglalaman ng isang petsa (= petsa ng data uri ng haligi).

Ano nagtrabaho para sa amin: Convert the date to a "single line of text". Pagkatapos, convert ito pabalik sa isang petsa.

That solved it. It was nice to see that the conversion worked, talaga. It was quite nervous that converting things this way would fail, but it did not.

Bug na ito ay itinapon isang malaking anino sa ibabaw ng data uri petsa sa isip ng client, kaya kami ay pagpunta sa ma-out naghahanap ng tiyak na sagot mula sa Microsoft at sana ay kukunin ko na mag-post at i-update dito sa susunod na maikling panahon sa kanilang mga opisyal na sagot at hotfix impormasyon.

Iba pang mga sanggunian:

http://www.kevincornwell.com/blog/index.php/cannot-get-the-list-schema-column-property-from-the-sharepoint-list/

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2383611&SiteID=1

<dulo>

Mag-subscribe sa aking blog.

Technorati Tags: ,

Mabilis at simpleng: Magpadala ng isang email na may naka-embed na hyperlink mula sa SharePoint Designer workflow

Sa sandaling o dalawang beses buwan, isang tao post ng forum tanong: "How do I include hyperlinks to URL’s that are clickable from a SharePoint Designer email?"

Itinanghal nang walang karagdagang komento: (mahusay, talaga doon ay karagdagang komento pagkatapos ng larawan):

imahen

Becky Isserman sumusunod up sa isang kapaki-pakinabang na paliwanag sa kung paano i-embed ang isang link sa isang item sa e-mail: http://www.sharepointblogs.com/mosslover/archive/2007/11/20/addition-to-paul-galvin-s-post-about-sending-an-e-mail-with-hyperlinks-in-spd.aspx

Bagong release: Extension ng SharePoint Designer workflow (string pagmamanipula ng mga function)

I-UPDATE: Tingnan dito para sa aking mga saloobin sa commercializing ang proyektong ito: http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!569.entry

Ko pa abalang nagtatrabaho sa aking Codeplex proyekto na kung saan ay kasalukuyang nakatuon sa pagbibigay ng string ng mga extension ng pagmamanipula sa daloy ng trabaho na nilikha sa pamamagitan ng SharePoint Designer.

Tingnan dito para sa mga detalye:

Proyekto ng bahay: http://www.codeplex.com/spdwfextensions

Bitawan: https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=spdwfextensions&ReleaseId=8280

Salin 1.0 Kabilang ang mga sumusunod na mga bagong tampok:

Tungkulin Paglalarawan (kung hindi pareho. Net function na)
Num-entry() Returns the number "entries" in a string as per a specified delimiter.

Halimbawa: Num-entries in a string "a,b,c" with delimiter "," = 3.

Pagpasok() Returns the nth token in a string as per a specified delimiter.
Haba String.Length
Palitan() String.Replace()
Naglalaman ng() String.Contains()
Returns the word "true" or the word "false".
Substring(simulan) String.Substring(simulan)
Substring(simulan,haba) String.Substring(simulan,haba)
ToUpper() String.ToUpper()
ToLower() String.ToLower()
StartsWith() String.StartsWith()
Returns the word "true" or the word "false".
EndsWith() String.EndsWith()
Returns the word "true" or the word "false".

Isang BDC runtime error ipinaliwanag

Ako sanhi ng BDC error sa linggong ito na ipinahayag sa sarili nito sa user interface at sa mga 12 hive log at runtime.

Una, ito ay lumitaw sa interface ng gumagamit:

Hindi makahanap ng mga patlang upang ipasok ang lahat ng mga Halaga ng Tagatukoy upang tamang magsagawa ng isang SpecificFinder MethodInstance sa Pangalan … Ensure input Parameters have TypeDescriptors associated with every Identifier defined for this Entity.

Narito ang isang screen shot:

clip_image001

I could also cause this message to appear in the 12 hive log at will (using my patented high-tech-don’t-try-this-at-home "mysterious errors" pamamaraan):

11/14/2007 09:24:41.27 w3wp.exe (0x080C) 0x0B8C SharePoint Portal Server Business Data 6q4x High Exception in BusinessDataWebPart.OnPreRender: System.InvalidOperationException: The Identifier value ”, of Type ”, is invalid. Expected Identifier value of Type ‘System.String’. at Microsoft.Office.Server.ApplicationRegistry.MetadataModel.Entity.FindSpecific(Object[] subIdentifierValues, LobSystemInstance lobSystemInstance) at Microsoft.SharePoint.Portal.WebControls.BdcClientUtil.FindEntity(Entity entity, Object[] userValues, LobSystemInstance lobSystemInstance) at Microsoft.SharePoint.Portal.WebControls.BusinessDataItemBuilder.GetEntityInstance(View desiredView) at Microsoft.SharePoint.Portal.WebControls.BusinessDataDetailsWebPart.GetEntityInstance() at Microsoft.SharePoint.Portal.WebControls.BusinessDataDetailsWebPart.SetDataSourceProperties()

I searched around and found some leads in the MSDN forum, but they weren’t enough for me to understand what I was doing wrong. I watched a webcast by Ted Pattison that my company has squirreled away on a server and came to realize my problem.

In my ADF, I’m connecting to a SQL database as shown:

            <Ari-arian Pangalan="RdbCommandText" Uri="System.String">
              <![CDATA[
                SELECT
                      SETID, CARRIER_ID, EFFDT, DESCR, EFF_STATUS, TAXPAYER_ID, NETWORK_ID, FRT_FORWARD_FLG, ALT_NAME1, ALT_NAME2, LANGUAGE_CD,
                      COUNTRY, ADDRESS1, ADDRESS2, ADDRESS3, ADDRESS4, CITY, NUM1, NUM2, HOUSE_TYPE, ADDR_FIELD1, ADDR_FIELD2, ADDR_FIELD3,
                      COUNTY, STATE, POSTAL, GEO_CODE, IN_CITY_LIMIT, COUNTRY_CODE, PHONE, EXTENSION, FAX, LAST_EXP_CHK_DTTM, FREIGHT_VENDOR,
                      INTERLINK_DLL, TMS_EXCLUDE_FLG
                FROM
                      dbo.PS_CARRIER_ID_VW WITH (nolock)
                WHERE
                  (SETID <> 'SHARE') at
                  (lower(CARRIER_ID) >= lower(@MinId)) at
                  (lower(CARRIER_ID) <= lower(@ MaxId)) at
                  (lower(DESCR) LIKE lower(@InputDescr))
                ]]>
            </Ari-arian>

I was provided that SQL from a DBA person and I’m given to understand that it’s a espesyal view they created just for me. The unique key there is CARRIER_ID.

Here is the bug I introduced:

      <Identifiers>
        <Identifier Pangalan="CARRIER_ID" TypeName="System.String" />
        <Identifier Pangalan="DESCR" TypeName="System.String" /> 
</Identifiers>

Sa isang lugar sa kahabaan ng linya, I had managed to confuse myself over the meaning of <Identifiers> and added DESCR even though it’s not actually an identifier. I took DESCR out of the identifiers set and presto! It all worked.

I hope this saves someone some grief 🙂

Technorati Tags: , , ,