Arkivji ta 'Kull Xahar: Frar 2008

Tħabbir Pubblika Minuri: Windows Live Sigurtà Settings u Tikkuntattja Sidien Ispazju

I receive a handful of messages from individuals via the built-in "send a message" funzjoni Microsoft tipprovdi bi spazji ħajjin (li tospita wkoll blog tiegħi) kull xahar.

Madwar terz tal-ħin, those users have secured their live spaces account such that I cannot reply. This is some kind of anti-spam feature I assume.

</aħħar>

Sempliċi Spjegazzjoni: “Valur ma taqax fi ħdan il-firxa mistennija.”

UPDATE: An anonymous poster left a great comment about internal names. Be sure to read it.

Meta taħdem ma 'riċevituri avveniment u l-kodiċi oħra li SharePoint oġġetti referenzi lista permezz tal-mudell oġġett, I spiss jagħmlu żbalji li jiġġeneraw dan l-iżball fil runtime:

Jtellgħu u jħaddmu Żball avveniment riċevitur Conchango.xyzzyEventReceiver fil xyzzy, Verżjoni = 1.0.0.0, Kultura = newtrali, PublicKeyToken = 0dc50a750396c3ac. Additional information is below. : Value does not fall within the expected range.

I think this is a fairly generic error that is potentially caused many different ways. Madankollu, one simple explanation is that I’m referencing a field incorrectly. If the name of the field is "Due Date", Ikolli referenza hija bħal dan riċevitur avveniment:

properties.ListItem["Due Date"]

Meta I misspell jew jużaw il-każ żbaljat meta referenzar-qasam, SharePoint generates the above mentioned runtime error. Per eżempju, dan hu ħażin:

properties.ListItem["due Date"]

</aħħar>

Abbona għall-blog tiegħi.

Utent Aħħari Quick Tip: Sort Views fil Librerija ta 'Dokumenti, Lista, eċċ.

Nistgħu, għandhom u ma joħolqu ħafna ideat fil-listi SharePoint (libreriji dokument, listi tad-dwana, eċċ). SharePoint always lists available views in alphabetical order. We cannot change this using out of the box functionality. If it can be done via customization (u M'inix ċert li tista), huwa ferm biex teknika għall-utent tiegħek tmiem tipiku.

Jekk inti tixtieq li tikkontrolla l-ordni li fiha SharePoint jelenka fehmiet disponibbli, sempliċiment prepend numru jew ittra lill-isem fehma, kif fil-:

1 – Mill Tip Materjal
2 – Dokumenti kollha
3 – Data dovuta

-jew-

A – Mill Tip Materjal
B – Dokumenti kollha
C – Data dovuta

I have also created views whose purpose is strictly to feed a KPI. I have been following this naming convention:

Z_KPI_[deskrizzjoni]

Li tikkawża "KPI tiegħi" fehmiet li jidhru fil-qiegħ tal-lista.

</aħħar>

Abbona għall-blog tiegħi.

IL-ĦADD Funny: “Meta I kien ftit Boy”

Bħala ġenitur, somewhere along the line I discovered the "When I was a little boy" trick.

My son, probabbilment erba 'jew ħames fil-ħin, kien playing bużżieqa u simili ħafna subien ftit li jilagħbu bil blalen, he popped it. He was very upset. The world had come to an end. I said to him, "when I was little boy, I had a balloon and it popped and eventually, I got a new balloon." It seemed to help him cope with his loss and led to a fun talk about what it was like when I was a little boy.

That worked well as a consolation technique and I used it a several times over the next period of time. I did get into trouble once when his Monster Rancher 3 creature died. I talked about how my dog, Prince, had died in a car accident. Din id-darba, his response was, "Now I feel bad about two things!" I shied away from using the "when I was a little boy" technique for consolation after that.

Before the dead dog incident, madankollu, I had also started to use the technique to convince him to do chores. "When I was a little boy, I had to go out and get the newspaper", "clean my room", "get Mommy her coffee cup", eċċ.

This too was pretty successful for a while, but he started to increasingly rebel against the tyranny of my childhood. One event, b'mod partikolari, marked the end. I told him to bring the garbage cans from curb back to the garage. He argued and I responded, "When I was a little boy, I had to take the garbage back to the garage." He responded, "Oh yeah! Well when you were a little boy, that was STUPID!".

</aħħar>

Abbona għall-blog tiegħi.

Tags:

Fehmiet u Kolonni fuq Listi u Libreriji Dokument msemmija ma jistgħux jinkisbu

UPDATE (02/29/08): Dan il-proġett CodePlex ġdida tidher li tipprovdi metodu biex tiġi żgurata kolonni individwali: http://www.codeplex.com/SPListDisplaySetting. If you have any experience working with it, jekk jogħġbok leave kumment.

Posters forum spiss jistaqsu mistoqsija bħal dan: "I have a manager view and and a staff view of a list. How do I secure the manager view so that staff can not use it?"

Huma wkoll spiss jistaqsu mistoqsija relatata: "I want to secure a specific metadata column so that only managers may edit that column while others may not even see it."

These answers apply to both WSS 3.0 u MOSS:

  • SharePoint ma jipprovdix l-il-kaxxa ta 'appoġġ għall-iżgurar fehmiet.
  • SharePoint ma jipprovdix l-il-kaxxa ta 'appoġġ għall-kolonni tas-sigurtà.

There are several techniques one can follow to meet these kinds of security requirements. Here’s what I can think of:

  • Use out-of-the-box item level security. Views always honor item level security configuration. Event receivers and/or workflow can automate security assignment.
  • Use personal views for "privileged" fehmiet. These are easy enough to set up. Madankollu, due to their "personal" natura, these need to be configured for each user. Use standard security configuration to prevent anyone else from creating a personal view.
  • Uża parti tad-data web ħsieb u jimplimentaw xi tip ta 'sigurtà AJAXy soluzzjoni tirqim.
  • Roll stess display lista funzjonalità tiegħek u jinkorporaw sigurtà tirqim fil-livell kolonna.
  • Timmodifika l-forom dħul tad-data u l-użu JavaScript flimkien mal-mudell ta 'sigurtà biex jimplimentaw sigurtà ta' livell kolonna tirqim.
  • Use an InfoPath form for data entry. Implement column-level security trimming via web service calls to SharePoint and conditionally hide fields as needed.
  • Roll stess ASP.NET funzjoni tiegħek dħul tad-data li timplimenta livell ta 'sigurtà kolonna tirqim.

Ebda wieħed minn dawn l-għażliet huma verament li kbir, iżda hemm mill-inqas triq biex isegwu jekk inti għandek bżonn, anki jekk huwa diffiċli.

NOTA: Jekk inti jinżlu kwalunkwe minn dawn mogħdijiet, don’t forget about "Actions -> Open with Windows Explorer". You want to be sure that you test with that feature to make sure that it doesn’t work as a "back door" u defeat iskema tas-sigurtà tiegħek.

Jekk għandek ideat oħra għal jew esperjenzi bil-kolonni jew il-veduti iżgurar, jekk jogħġbok email me jew leave kumment u jien ser taġġorna dan kollokament kif xieraq.

</aħħar>

Abbona għall-blog tiegħi.

Tip Quick: BDC Numri Verżjoni ADF Are Friend Your

Jekk int idejn kodifikazzjoni fajls ADF u jagħmlu ħafna tal-kodiċi / importazzjoni / test ċikli, use the version number to make your life easier.

Ddejjaqni li jammettu li, imma sakemm din il-ġimgħa, I was always deleting the ADF and re-importing it. This would break my business data columns and make me re-wire them. All unnecessary.

File this under "it’s obvious once you see it".

Eżempju:

<LobSystem
xmlns:XSi="http://www.w3.org/2001/XMLSchema-instance" XSi:schemaLocation="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog BDCMetadata.xsd" Tip="Webservice" Verżjoni="1.2.0.0" Isem="xyzzyDocumentReview" xmlns="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog">

Bidla li verżjoni u ri-importazzjoni u l-kolonna data negozju eżistenti tuża l-verżjoni aġġornata awtomatikament bl-ebda konfigurazzjoni addizzjonali meħtieġa.

</aħħar>

Abbona għall-blog tiegħi.

Tags:

Soluzzjoni: Picker BDC Shows Waħda Biss Kolonna Of Riżultati

In my on-going attempts at providing a more useful lookup column using BDC, I hit a wall with the BDC picker. If you haven’t see it, the BDC picker is similar to a people picker except that it works with columns of type "business data".

You access the picker by clicking on the open book icon of a business data column as shown:

immaġni

The above image shows a business data column called "Master Document Id". That column is connected, via BDC, to a web service. The web service returns two columns of information: Document ID and Title. The business purpose here is to provide a "this document is based on" funzjoni. Users select a "master" document and when they save, an event receiver copies meta data fields from the referenced master.

By default, the BDC picker looks like this when I search for a document whose ID = "38":

clip_image002

That’s helpful, but not good enough. People don’t think in terms of IDs, they think in terms of titles and/or other meta data. The picker allows you to search on other columns (e.g. Titolu) but won’t show the actual list of titles it found, just their DocId’s as shown here:

clip_image002[1]

(The screen shot isn’t so great because I didn’t pick a search that returns any valid results, but you can see that if it had found some results, it would only have shown DocId’s, not titles).

I searched high and low for the answer to this and failed. Kollega tiegħi, the venerable Jonathan Bradshaw, had faced and solved this issue. When I reached out to him for help, he pointed me in the right direction.

Configure the picker to show multiple columns via the "ShowInPicker" property in the ADF:

<Proprjetà Isem="ShowInPicker" Tip="System.Boolean">vera</Proprjetà>

In more detail:

  <!-- Titolu -->
  <TypeDescriptor TypeName="System.String" Isem="Titolu" >
    <LocalizedDisplayNames>
      <LocalizedDisplayName LCID="1033">Titolu</LocalizedDisplayName>
    </LocalizedDisplayNames>
    <Properties>
      <Proprjetà Isem="DisplayByDefault" Tip="System.Boolean">vera</Proprjetà>
      <Proprjetà Isem="ShowInPicker" Tip="System.Boolean">vera</Proprjetà>
    </Properties>
  </TypeDescriptor>

Setting this property does introduce a minor problem. As soon as you set it once, you need to set it for every column you want to show. Fil-każ tiegħi, BDC picker showed DocId by default. Madankollu, once I added "ShowInPicker" to Title, DocId no longer displayed. I solved that by explicitly setting the ShowInPicker property for Doc ID.

Here is the result:

immaġni

(I’ll explain the odd-looking "168 – CamlSchema.xsd" construction in a future blog post. In short, it’s a concatenated string that allows for a slightly better user experience).

Of course, having written this blog entry, I just did a search for "ShowInPicker" and found numerous hits, including this one: http://msdn2.microsoft.com/en-us/library/ms583986.aspx. It explains the meaning of that property along with some other good BDC stuff.

</aħħar>

Abbona għall-blog tiegħi!

Tags:

Quick & Easy: Oħloq Folder u Jassenja Tip Kontenut (Jew, Have KPIs tiegħek u Kul Them Too)

In order to work around a KPI problem I wrote about here, I did some testing and discovered that KPI’s work against folders with meta data in the same way that they work against documents or list items. I proved it out by creating a new content type based on the folder content type and then added a few fields. I created some indicators and proved to myself that KPIs work as expected. This was welcome news. It’s not perfect, because the drill-down you get from the KPI against the folders is not exactly what you want. This isn’t too much a drawback in my case because 1) the end users don’t know any better and 2) the drill-down goes to a folder. They click the folder name and they are at the item. It’s two clicks instead of one, which isn’t the end of the world.

This flowed nicely with the work I was doing. I am creating a folder for every document that gets uploaded. This is done via an event receiver. Bħala riżultat, it’s a piece of cake to keep the parent folder’s meta data in sync with the KPI-driven meta data from the file itself since the plumbing is already in place. This allows me to have my KPI’s and eat them too 🙂

I modified the event receiver to add the folder and then set this new folder’s content type to my custom KPI-friendly content type. This bit of code did the trick:

 SPFolderCollection srcFolders = targetWeb.GetFolder("Documents").SubFolders;
  SPFolder addedFolder = srcFolders.Add(properties.ListItem.ID.ToString());
  SPContentTypeId kpiCT = ġdid SPContentTypeId("0x0120002A666CAA9176DC4AA8CBAA9DC6B4039F");
  addedFolder.Item["Content Type ID"] = kpiCT;
  addedFolder.Item.Update();

To locate the actual Content Type ID, I accessed that content type via site settings and copy/pasted it from the URL as shown:

immaġni

</aħħar>

Abbona għall-blog tiegħi!

Quick u Easy: Niżżel l-SPFolder ta 'SPListItem fi Receiver Event

Ddejjaqni li jammettu li, but I struggled with this one all day. My event receiver needs to update a field of its parent folder. This little bit shows how to do it:

privat null UpdateParentFolder(SPItemEventProperties proprjetajiet)
{

SPFolder thisItemFolder = properties.ListItem.File.ParentFolder;
thisItemFolder.Item["ZZ Approval Status"] = "Good news, kulħadd!";
thisItemFolder.Item.Update();


} // UpdateParentFolder

F'dan il-każ, Jien jaħdmu ma 'librerija dokument u l-proprjetajiet huma ġejjin minn avveniment ItemAdded.

Il-trick huwa li inti ma tistax tikseb l-SPFolder 'l-oġġett direttament mill-oġġett innifsu (I.E. properties.ListItem.Folder huwa null). Minflok, mur File assoċjati l-oġġett lista u jiksbu folder tal-fajl.

</aħħar>

Abbona għall-blog tiegħi!

Énième Event Receiver Trick Debug

I’m sure I’m not the first person to come up with this. Madankollu, I haven’t noticed anyone publish a trick like this since I started paying close attention to the community last July. Allura, Ħsibt I d jimpustah dan il-ponta debug malajr u faċli.

Jien jaħdmu fuq riċevitur każ li bdew jiġġeneraw dan l-iżball fil- 12 doqqajs:

Jtellgħu u jħaddmu Żball avveniment riċevitur Conchango.xyzzyEventReceiver fil xyzzy, Verżjoni = 1.0.0.0, Kultura = newtrali, PublicKeyToken = blahbalhbalh. Additional information is below. : Referenza Għan mhux stabbiliti għal istanza ta 'oġġett.

I didn’t know where I had introduced this bug because I had done too many things in one of my code/deploy/test cycles.

I ppruvaw din is-soluzzjoni tikseb PDB tiegħi fil hemm ma 'jittama li l-SharePoint 12 doqqajs kieku juru t traċċa munzell, iżda l-ebda xortih. I don’t know if it’s possible and if someone does, jekk jogħġbok let me know 🙂

Naf huwa possibbli li jiktbu messaġġi tiegħek log stess għall- 12 doqqajs. Frankly, I riedu xi ftit inqas scary u aktar malajr biex jimplimentaw.

Dan ġara lili li I jistgħu għall-inqas nikseb xi traċċa informazzjoni bażika mill-qbid u mill-ġdid jitfg eċċezzjonijiet ġeneriċi bħal dan:

  jippruvaw {
    UpdateEditionDate(proprjetajiet);
  }
  qabda (Eċċezzjoni u)
  {
    tarmi ġdid Eċċezzjoni("Dispatcher, UpdateEditionDate(): Eċċezzjoni: [" + e.ToString() + "].");
  }

Dan wera up fil- 12 doqqajs thusly:

Jtellgħu u jħaddmu Żball avveniment riċevitur Conchango.xyzzyEventReceiver fil xyzzy, Verżjoni = 1.0.0.0, Kultura = newtrali, PublicKeyToken = blahblahblah. Additional information is below. : Dispatcher, UpdateEditionDate(): Eċċezzjoni: [System.NullReferenceException: Referenza Għan mhux stabbiliti għal istanza ta 'oġġett. at Conchango.xyzzyManagementEventReceiver.UpdateEditionDate(Proprjetajiet SPItemEventProperties) at Conchango.xyzzyManagementEventReceiver.Dispatcher(Proprjetajiet SPItemEventProperties, EventDescription String)].

Li tatni l-dettall I meħtieġa biex jillokalizzaw din il-problema partikolari u nistenna li jużawh ħafna miexi 'l quddiem.

</aħħar>

Abbona għall-blog tiegħi!