بایگانی ماهانه: نوامبر 2007

خزه من می گوید نام ستون من است محفوظ است و یا در استفاده از … اما این طور نیست

تکمیلی 12/04/07: دیدن this Microsoft KB (http://support.microsoft.com/kb/923589) for related information.

Actually, it turns out it is, اما 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, but the end result is this:

  • 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. بنابراین, "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, در واقع, 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"). جایی در امتداد خط, a 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, اما, remained but in the "_Hidden" group. If someone knows better, please let me know via پست الکترونیک 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.

</پایان>

اطلاعات در حال حاضر از طریق OM فهرست سفارشی (یا, با این حال، یکی دیگر از OM تاریخ Displayor [مانند YACC, اما متفاوت])

امروز, 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."

The column in question could be created, deleted and re-created in another environment, so I knew it wasn’t a reserved name. اما, I simply couldn’t find the column anywhere via the standard SharePoint user interface at any site in the site collection.

I posted to MSDN forums here and the indomitable Andrew Woodward pointed me in the direction of the underlying object model data.

I went off to codeplex to find some tools that would help me peer into the underlying OM data and help me locate the trouble.

I tried several tools and they were very cool and interesting but in the end, the UI wasn’t good enough for my purpose. I’m not criticizing them by any means, but clearly the tool-makers didn’t have my problem in mind when they created their UI :). Most people seem to be investing a fair amount of time and effort in creating workstation / client applications that provide tree views, right-click context menus and so forth. These are nice and all, but it’s a lot of work to create a top-of-the-line user experience that is also very flexible.

I really needed an answer to this problem. It occurred to me that if I could get all of the site columns in the site collection into a custom list, I could filter, sort and create views that would help me find this supposedly existing column (which it did, جهت مشاهده فرم خرید). I went ahead and did that and an hour or two later, had all my site columns loaded into a custom list with grouping, sorting and so forth. I found my answer five minutes later.

If and when I successfully take over the world, I think I will decree that all SharePoint tools providers must seriously consider surfacing their object model data in a custom list. That way, I have the power to search any way I want (constrained, البته, by standard sharepoint features).

سفارشی شیرپوینت طراح گردش کار اقدام — مشاهده AM <FieldBind نوع طراح =”StringBuilder” … />

فونز مشاهده سریع فقط یک تفاوت بسیار مهم بین این دو تعریف وجود دارد:

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

در مقابل:

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

برای اولین بار نشان می دهد مانند این در SPD:

تصویر

در حالی که دومی را نشان می دهد مثل این:

تصویر

من مطمئن هستم که چگونه مفید این عکس روی صفحه نمایش هستند نیستم اما من در تلاش به آنها را، بنابراین شما باید آنها را مشاهده قرار 🙂

مشاهده است: StringBuilder به شما اجازه می دهد برای ساخت رشته (بدیهی است که) با مخلوط کردن با هم رشته و گردش داده ها (via the "Add Lookup" را فشار دهید در پایین گوشه سمت چپ). When you use the Add Lookup button, it inserts a token in the form "[%token%]". When SharePoint invokes your custom action, (C# code in my case), SharePoint passes the token itself, not the value of the token. If you use the default designer type (the second type), SharePoint expands the token and passes actual value of the token to your action.

StringBuilder = BAD, default designer type = GOOD.

البته, 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 (which incidentally is exactly what one does to create a dynamic subject for the email action, اما این موضوع برای ورود به وبلاگ دیگر, کندهار کندهار).

<پایان پیام />

زودرس فعال سازی گردش کار — یک راه حل غیر پزشکی

تکمیلی: See this MSDN discussion, especially the last 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, it may be as simple as making at least one of the fields mandatory.

I have a document library that supports eight content types.

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 اینجا).

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. در این مرحله, 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. در همان زمان, 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. پس … 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. دیدن اینجا 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

پرایمر مبانی امنیت شیرپوینت / اجتناب از بروز اشتباه متداول

تکمیلی 12/18/07: مشاهده مقاله پل Liebrand برای برخی از پیامدهای فنی از بین بردن و یا تغییر گروه پیش فرض نام (نظر خود را در زیر و همچنین).

بررسی اجمالی:

SharePoint security is easy to configure and manage. اما, 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. (من به داشتن این مشکل خودم اعتراف). This blog entry hopefully provides a useful SharePoint security primer and points towards some security configuration best practices.

نکته مهم:

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 ایمیل من. I’ll make corrections post haste.

اصول:

هدف از این مرور, چهار جنبه اساسی برای امنیت وجود دارد: کاربران / گروه ها, اشیاء مجموعه قابل تامین, سطح اجازه و ارث.

کاربران و گروه ها شکستن به پایین:

  • کاربران شخصی: کشیده از اکتیو دایرکتوری و یا به طور مستقیم در شیرپوینت.
  • گروه های دسته جمعی: 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" به یک شیء خاص مجموعه قابل تامین.

اشیاء مجموعه قابل تامین شکستن به حداقل:

  • سایت
  • کتابخانه های سند
  • اقلام در لیست ها و کتابخانه های سند
  • پوشه ها
  • مختلف BDC تنظیمات.

مجموعه قابل تامین اشیاء دیگر, اما شما می توانید از تصویر.

سطوح اجازه: بسته نرم افزاری از دانه / low level access rights that include such things as create/read/delete entries in lists.

وراثت: 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.

کاربران و گروه های مربوط به اشیاء مجموعه قابل تامین از طریق سطوح اجازه و ارث.

مهم ترین قوانین امنیتی به درک, همیشه 🙂 :

  1. گروه ها به سادگی مجموعه ای از کاربران.
  2. گروه ها در مجموعه سایت های جهانی (i.e. چنین چیزی به عنوان یک گروه در یک سطح سایت تعریف شده وجود ندارد).
  3. نام گروه تحمل نیست, گروه انجام نمی, و خود را, have any particular level of security.
  4. Groups have security in the context of a specific securable object.
  5. شما ممکن است سطوح مجوز متفاوت به همان گروه برای هر شیء مجموعه قابل تامین اختصاص.
  6. وب سیاست کاربرد مغلوب ساختن پیشی جستن از این همه (پایین را ببینید).

مدیران امنیت از دست رفته را در دریایی از گروه و لیست کاربر همیشه می توانید در مورد این بدیهیات تکیه می کنند برای مدیریت و تنظیمات امنیتی خود را درک.

مشکلات متداول:

  • نام گروه به دروغ این مفهوم را میرسانند اجازه: خارج از کادر, 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" گروه نمی تواند در همه, اما فقط به عنوان خوانده شده (مثلا). This would not be a good idea, بدیهی است که, از آنجایی که این امر می تواند بسیار گیج کننده است.
  • گروه ها در سطح سایت تعریف نشده. 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" پیوند. 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.
  • عضویت در گروه ها توسط سایت متفاوت (i.e. آن همان است که در همه جا این گروه استفاده شده است): Consider the group "Owner" و دو سایت, "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, من ممکن است دسترسی به افراد و گروه ها لینک ها را از طریق سایت 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. در واقع, I’m removing her from the global Owners group. Hilarity ensues.
  • عدم به نام گروه بر اساس نقش خاص: 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, من باید دو گروه جدید: "HR Owners" and "Logistics Owners" و اختصاص سطوح اجازه معقول برای هر یک و مقدار حداقل مورد نیاز برای کاربرانی که به انجام کار خود را.

مفید دیگر منابع:

اگر شما ساخته شده است آن را در این دور:

Please let me know your thoughts via the comments or email me. If you know other good references, لطفا همین کار را!

برچسب ها:

دسترسی سریع و آسان: ایجاد داده های مشاهده قسمت وب (DVWP)

There is a wealth of great information on the WSS 3.0 داده ها مشاهده وب قسمت (DVWP) on the web from several sources. اما, 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" series to address it.

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, others) which are beyond the scope of this little "Quick and Easy" ورود. To get more information on this subject, I recommend both books اینجا 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:
تصویر

“می توانید لیستی طرح مالکیت ستون از لیست شیرپوینت” — توضیحات / کار-arounds ها

این هفته, we finally reproduced a problem that had been reported by a remote user: When she tried to export the contents of a list to excel, things would seem to start working, but then Excel would pop up an error: "Cannot get the list schema column property from the SharePoint list". She was running office 2003, windows XP and connecting to MOSS.

I searched the Internets and saw some speculation but nothing 100% definitive. Hence, this post.

The problem: Exporting a view to excel that contains a date (date = the data type of the column).

What worked for us: Convert the date to a "single line of text". سپس, convert it back to a date.

That solved it. It was nice to see that the conversion worked, در حقیقت. It was quite nervous that converting things this way would fail, but it did not.

This bug has thrown a huge shadow over the date data type in the client’s mind, so we’re going to be seeking out a definitive answer from Microsoft and hopefully I’ll post and update here in the next short period of time with their official answer and hotfix information.

Other references:

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

<پایان>

مشترک شدن در وبلاگ من.

برچسب ها: ,

سریع و ساده: ارسال یک ایمیل با لینک تعبیه شده از طراح گردش کار شیرپوینت

یک یا دو بار در ماه, کسی سوال انجمن: "How do I include hyperlinks to URL’s that are clickable from a SharePoint Designer email?"

ارائه شده بدون نظر بیشتر: (خوب, در واقع بیشتر وجود دارد پس از تصویر نظر):

تصویر

، بکی Isserman زیر با توضیح مفید در مورد نحوه جاسازی یک لینک به یک آیتم در ایمیل: 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

نسخه جدید: شیرپوینت ضمیمهها طراح گردش کار (رشته توابع دستکاری)

تکمیلی: اینجا را ببینید برای افکار من در تجاری کردن این پروژه: http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!569.entry

I’ve been busy working on my Codeplex project which is presently focused on providing string manipulation extensions to workflows created via SharePoint Designer.

See here for details:

Project home: http://www.codeplex.com/spdwfextensions

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

نسخه 1.0 includes the following new features:

تابع شرح (اگر همان عملکرد خالص)
تعداد نوشته های() Returns the number "entries" in a string as per a specified delimiter.

مثلا: Num-entries in a string "a,ب,ج" with delimiter "," = 3.

ورود() Returns the nth token in a string as per a specified delimiter.
طول String.Length
جایگزین کردن() String.Replace()
شامل() String.Contains()
Returns the word "true" or the word "false".
زیر رشته(شروع) String.Substring(شروع)
زیر رشته(شروع,length) String.Substring(شروع,length)
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".

BDC خطا در زمان اجرا توضیح داد

من باعث یک خطای BDC در این هفته است که خود را در رابط کاربری و آشکار 12 کندو ورود به سیستم در زمان اجرا.

اولین, این به نظر می رسد در رابط کاربر:

نمی تواند پیدا زمینه به قرار دادن تمام ارزشهای شناسه به درستی اجرا SpecificFinder MethodInstance با نام و نام خانوادگی … اطمینان حاصل کنید که پارامترهای ورودی TypeDescriptors مرتبط با هر شناسه تعریف شده برای این نهاد.

در اینجا یک شات صفحه نمایش:

clip_image001

من هم می تواند باعث این ارسال در ظاهر می شود 12 ورود به سیستم کندو در اراده (using my patented high-tech-don’t-try-this-at-home "mysterious errors" روش):

11/14/2007 09:24:41.27 w3wp.exe (0x080C) 0x0B8C SharePoint Portal Server Business Data 6q4x High Exception in BusinessDataWebPart.OnPreRender: System.InvalidOperationException: مقدار شناسه ”, از نوع ”, نامعتبر است. Expected Identifier value of Type ‘System.String’. در Microsoft.Office.Server.ApplicationRegistry.MetadataModel.Entity.FindSpecific(هدف[] subIdentifierValues, LobSystemInstance lobSystemInstance) در Microsoft.SharePoint.Portal.WebControls.BdcClientUtil.FindEntity(نهاد نهاد, هدف[] userValues, LobSystemInstance lobSystemInstance) در Microsoft.SharePoint.Portal.WebControls.BusinessDataItemBuilder.GetEntityInstance(نمایش desiredView) در Microsoft.SharePoint.Portal.WebControls.BusinessDataDetailsWebPart.GetEntityInstance() در Microsoft.SharePoint.Portal.WebControls.BusinessDataDetailsWebPart.SetDataSourceProperties()

من به اطراف جستجو و برخی از سرنخ ها در MSDN انجمن, but they weren’t enough for me to understand what I was doing wrong. I watched a webcast by تد Pattison که من شرکت دور در سرور squirreled است و متوجه مشکل من.

در ADF من, من در اتصال به پایگاه داده SQL به عنوان نشان داده شده است:

            <ویژگی نام="RdbCommandText" نوع="System.String">
              <![CDATA[
                را انتخاب کنید
                      , CARRIER_ID, EFFDT, DESCR, EFF_STATUS, TAXPAYER_ID, NETWORK_ID, FRT_FORWARD_FLG, ALT_NAME1, ALT_NAME2, LANGUAGE_CD,
                      کشور, ADDRESS1, ADDRESS2, ADDRESS3, ADDRESS4, شهر, NUM1, NUM2, HOUSE_TYPE, ADDR_FIELD1, ADDR_FIELD2, ADDR_FIELD3,
                      شهرستان, دولت, پستی, GEO_CODE, IN_CITY_LIMIT, COUNTRY_CODE, گوشی تلفن همراه, EXTENSION, FAX, LAST_EXP_CHK_DTTM, FREIGHT_VENDOR,
                      INTERLINK_DLL, TMS_EXCLUDE_FLG
                 (nolock)
                مکانی که در آن
                  (SETID <> سهم ') و
                  (کاهش(CARRIER_ID) >= پایین(@ MinId،)) و
                  (کاهش(CARRIER_ID) <= پایین(@ MaxId)) و
                  (کاهش(DESCR) LIKE پایین تر(@ InputDescr،))
                ]]>
            </ویژگی>

من که SQL از یک شخص DBA ارائه شد و به من داده ام به درک که آن را ویژه view they created just for me. The unique key there is CARRIER_ID.

در اینجا اشکال من معرفی:

      <شناسه>
        <شناسه نام="CARRIER_ID" TypeName="System.String" />
        <شناسه نام="DESCR" TypeName="System.String" /> 
</شناسه>

جایی در امتداد خط, من موفق شده بود تا خود را بیش از معنای اشتباه <شناسه> and added DESCR even though it’s not actually an identifier. I took DESCR out of the identifiers set and presto! این همه کار می کرد.

امیدوارم این یکی از غم و اندوه را نجات دهد 🙂

برچسب ها: , , ,