Monthly Archives: Otsailaren 2008

Minor Herri Iragarpena: Windows Live Segurtasun ezarpen eta Space Jabeak harremanetan

I receive a handful of messages from individuals via the built-in "send a message" funtzioa Microsoft espazio zuzeneko eskaintzen (horrek, gainera, nire blog acoge) hilero.

Ko denbora buruzko hirugarren, those users have secured their live spaces account such that I cannot reply. This is some kind of anti-spam feature I assume.

</amaiera>

Simple azalpena: “Balioa ez da espero tartean erori.”

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

Noiz gertaera hargailuak eta beste kode batekin lan erreferentziak SharePoint zerrenda bidez objektu ereduaren elementuak, Egin ohi dut akatsak sortzen duten exekuzio at error honetan:

Errorea kargatu eta exekutatzen gertaera hartzailea xyzzy en Conchango.xyzzyEventReceiver, 1.0.0.0 bertsioa =, Kultura = neutrala, 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. Hala eta guztiz ere, one simple explanation is that I’m referencing a field incorrectly. If the name of the field is "Due Date", Bertan azaldu behar dut hau bezalako gertaera hargailu batean:

properties.ListItem["Due Date"]

Noiz edo misspell dut oker gertatzen eremuan erreferentzia, SharePoint generates the above mentioned runtime error. Adibidez, hau ez da zuzena:

properties.ListItem["due Date"]

</amaiera>

Nire blog Harpidetu.

Technorati Tags:

Azken erabiltzailearen azkarra Tip: Ordena Dokumentua Liburutegia Views, Zerrenda, etc.

Dezakegu, behar du, eta, hainbat aldiz sor ez SharePoint zerrendetan (Dokumentu liburutegiak, Ohiko zerrendak, etc). 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 (eta ez nago ziur aski), urrun da tekniko zure amaiera tipikoa erabiltzaile.

Nahi duzu diren ordena SharePoint zerrendatzen eskuragarri aldiz kontrolatu nahi baduzu, besterik gabe, gunearen aurretik zenbaki bat edo gutun ikuspegi izena, bezala:

1 – Material motaren arabera
2 – Dokumentu guztiak
3 – Epemuga

-edo-

A – Material motaren arabera
B – Dokumentu guztiak
C – Epemuga

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

Z_KPI_[deskribapena]

That causes my "KPI" aldiz zerrendaren behealdean agertzen.

</amaiera>

Nire blog Harpidetu.

Igandea Funny: “Noiz Little Boy bat izan dut”

Guraso gisa, somewhere along the line I discovered the "When I was a little boy" trick.

Nire semea, seguruenik, lau edo bost momentuan, zen puxika bat jolasten eta pixka gehienak mutilak duten globoak jolastu atsegin, he popped it. He was very upset. The world had come to an end. I said to him, "when I was little boy, Puxika bat izan nuen, eta, azkenean, idatz ezazu, 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. Oraingo honetan, Bere erantzuna izan zen, "Now I feel bad about two things!" I shied away from using the "when I was a little boy" kontsolamendua teknika ondoren.

Zakur hildako istilurik aurretik, Hala ere,, 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", etc.

Hori ere izan zen, nahiko pixka bat arrakastatsua, but he started to increasingly rebel against the tyranny of my childhood. One event, bereziki, 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, izan zen ergela!".

</amaiera>

Nire blog Harpidetu.

Technorati Tags:

Aldiz Zerrendak eta zutabeak eta Dokumentu Liburutegiak on ezin daiteke segurtatu

UPDATE (02/29/08): Berri honen codeplex proiektua dela dirudi banakako zutabe bermatu metodo bat eskaini nahi da: http://www.codeplex.com/SPListDisplaySetting. If you have any experience working with it, Mesedez, utzi iruzkin bat.

Foroa kartelak maiz eskatu horrelako galdera bat: "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?"

Era berean, maiz eskatu erlazionatutako galdera bat: "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 eta MOSS:

  • SharePoint ematen ez out-of-the-box aldiz bermatu laguntza.
  • SharePoint ematen ez out-of-the-box segurtasun zutabeak laguntza.

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" aldiz. These are easy enough to set up. Hala eta guztiz ere, due to their "personal" izaera, these need to be configured for each user. Use standard security configuration to prevent anyone else from creating a personal view.
  • Erabili ikuspegi datuak web parte AJAXy eta segurtasun-irtenbide trimming mota batzuk ezartzea.
  • Bildu zeure zerrenda pantailako funtzionaltasun eta segurtasun txertatu zutabea mailan trimming.
  • Aldatu datuak sarrera inprimakiak eta JavaScript erabili segurtasun eredu batera zutabe-mailako segurtasun trimming ezartzeko.
  • Use an InfoPath form for data entry. Implement column-level security trimming via web service calls to SharePoint and conditionally hide fields as needed.
  • Bildu zeure datuak ASP.NET sarrera funtzioa zutabe segurtasun maila trimming inplementatzen.

Aukera horiek ez dira benetan handia duten, baina, gutxienez bide bat behar izanez gero jarraitu behar da, bada ere, zaila da.

OHARRA: Behera joan behar bada, bide hauetako edozein, 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" eta garaitzeko zure segurtasun eskema.

Duzu, beste ideia edo esperientziak bada zutabe bermatu edo ikusia, mesedez email me edo utzi iruzkin bat, eta eguneratu egokiak posting dut.

</amaiera>

Nire blog Harpidetu.

Technorati Tags:

Quick Tip: BDC ADF bertsio zenbakiak Zure lagunaren zaude

Zuk ADF fitxategiak eskuz kodetu eta kode asko / import / test zikloak egiten, use the version number to make your life easier.

Aitortzen gorroto dut, baina aste honetan arte, 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".

Adibidea:

<LobSystem
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog BDCMetadata.xsd" Mota="WebService" Bertsioa="1.2.0.0" Izena="xyzzyDocumentReview" xmlns="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog">

Aldatu bertsio hori eta re-inportazio eta dauden negozio datuak zutabe eguneratzen bertsioa erabiltzen du automatikoki osagarriak konfigurazio ez behar dituzten.

</amaiera>

Nire blog Harpidetu.

Technorati Tags:

Irtenbidea: BDC Picker Only One emaitzen zutabea erakusten

Nire on-going bat emateko saiakera batean gehiago erabilgarria bilaketa zutabe BDC erabiliz, 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".

Hautatzailea sartzeko duzun negozio datuak zutabea liburu irekia ikonoa erakusten klik eginez:

image

The above image shows a business data column called "Master Document Id". That column is connected, BDC bidez, 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" funtzioa. Users select a "master" dokumentu eta noiz gorde, bat gertaera hartzailea kopiak meta datuak erreferentziatutako maisua eremuak.

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

clip_image002

Hori lagungarria izan, 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. Izenburua) baina ez dira agertuko izenburuak aurkitu zerrenda benetako, beren DocId bezala hemen:

clip_image002[1]

(Pantaila jaurtiketa ez da hain handia izan nuen, ez duelako jaso bilaketa bat itzultzen baliozko edozein emaitza, baina ikusi ahal izango duzu izan da aurkitu bada zenbait emaitza hori, litzateke soilik erakutsi dute DocId en, ez izenburuak).

I searched high and low for the answer to this and failed. Nire lankide, agurgarri du Jonathan Bradshaw, had faced and solved this issue. When I reached out to him for help, me adierazi zuen du eskuinetik egin-norabidea in.

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

<De la Propiedad Izena="ShowInPicker" Mota="System.Boolean">Egia</De la Propiedad>

Zehatz-mehatz more In:

  <!-- Izenburua -->
  <TypeDescriptor TYPENAME="System.String" Izena="Izenburua" >
    <LocalizedDisplayNames>
      <LocalizedDisplayName LCID="1033">Izenburua</LocalizedDisplayName>
    </LocalizedDisplayNames>
    <Propietateak>
      <De la Propiedad Izena="DisplayByDefault" Mota="System.Boolean">Egia</De la Propiedad>
      <De la Propiedad Izena="ShowInPicker" Mota="System.Boolean">Egia</De la Propiedad>
    </Propietateak>
  </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. Nire kasuan, BDC picker showed DocId by default. Hala eta guztiz ere, once I added "ShowInPicker" to Izenburua, DocId no longer displayed. I solved that by explicitly setting the ShowInPicker property for Doc ID.

Here emaitza da,:

image

(I’ll explain the odd-looking "168 – CamlSchema.xsd" construction in a future blog post. Laburbilduz, bat concatenated string duten bat user, apur bat-esperientzia hobea for aukera ematen dio da it).

Jakina, habiendo idatzizko blog zabaldubildudel.icio.us Istorio hau, I just did a search for "ShowInPicker" , eta aurkitu da hainbat eta hainbat Klik-kopurua, hau ko barne,: http://msdn2.microsoft.com/en-us/library/ms583986.aspx. It explains the meaning of that property along with some other good BDC stuff.

</amaiera>

Nire blog Harpidetu!

Technorati Tags:

Quick & Erraza: Sortu karpeta bat eta Eduki mota bat esleitu (Edo, Zure KPIs eta beraiekin jan ere)

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) erabiltzaileek ez dakite edozein hobeto eta 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, eta hori ez da munduaren amaiera.

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. Baten ondorioz, bat tarta zati mantentzen da karpeta gurasoa en 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").Azpikarpetak;
  SPFolder addedFolder = srcFolders.Add(properties.ListItem.ID.ToString());
  SPContentTypeId kpiCT = berria SPContentTypeId("0x0120002A666CAA9176DC4AA8CBAA9DC6B4039F");
  addedFolder.Item["Content Type ID"] = KpiCT;
  addedFolder.Item.Update();

Benetako Eduki mota ID lokalizatu, Eduki gune ezarpenak eta kopia bidez mota / itsatsi ezazu URL from orokorrak gisa sar dut:

image

</amaiera>

Nire blog Harpidetu!

Technorati Tags: ,

Azkarra eta erraza: Talde SPListItem baten SPFolder gertaera hargailuen batean

Aitortzen gorroto dut, 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:

pribatua gal UpdateParentFolder(SPItemEventProperties propietate)
{

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


} // UpdateParentFolder

Kasu honetan, Dokumentu liburutegi batekin ari naiz lanean, eta propietate dira ItemAdded gertaera datozen.

Tranpa da, ezin dela lortu Elementu SPFolder zuzenean elementua bera (I.E. properties.ListItem.Folder null). Horren ordez, du zerrendako elementu horrek lotutako File joan eta fitxategi horrek karpeta lortu.

</amaiera>

Nire blog Harpidetu!

Technorati Tags:

Yet Another Gertaera hargailuen Araztu Trick

I’m sure I’m not the first person to come up with this. Hala eta guztiz ere, I haven’t noticed anyone publish a trick like this since I started paying close attention to the community last July. Beraz,, Hau da, azkarra eta erraza arazketa punta bidaltzeko nuela pentsatu nuen.

Gertaera baten hartzailea duten hasi akats hau sortzeko nabil 12 hive:

Errorea kargatu eta exekutatzen gertaera hartzailea xyzzy en Conchango.xyzzyEventReceiver, 1.0.0.0 bertsioa =, Kultura = neutrala, PublicKeyToken = blahbalhbalh. Additional information is below. : Objektu erreferentzia ez objektu baten instantzia bat ezarri.

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.

Saiatu dut irtenbide hau nire pdb lortzeko hor itxaropen dituzten SharePoint-en 12 hive automatikoa erakutsiko luke, but no luck. I don’t know if it’s possible and if someone does, please let me know 🙂

Posible al da, ezagutzen dut idatzi, zure log mezuak 12 hive. Frankly, Zerbait apur bat gutxiago scary eta azkarrago ezartzea nahi dut.

Gertatu zait ezin dudala gutxienez lortu zenbait aztarna oinarrizko informazioa eta harrapatzeko berriro bota hau bezalako salbuespenak by generic:

  saiatu {
    UpdateEditionDate(propietate);
  }
  harrapatzeko (Salbuespen eta)
  {
    bota berria Salbuespen("Dispatcher, UpdateEditionDate(): Salbuespen: [" + e.ToString() + "].");
  }

Honek erakutsi du parte 12 hive thusly:

Errorea kargatu eta exekutatzen gertaera hartzailea xyzzy en Conchango.xyzzyEventReceiver, 1.0.0.0 bertsioa =, Kultura = neutrala, PublicKeyToken = blahblahblah. Additional information is below. : Aztergailu, UpdateEditionDate(): Salbuespen: [System.NullReferenceException: Objektu erreferentzia ez objektu baten instantzia bat ezarri. at Conchango.xyzzyManagementEventReceiver.UpdateEditionDate(SPItemEventProperties propietate) at Conchango.xyzzyManagementEventReceiver.Dispatcher(SPItemEventProperties propietate, Katea eventDescription)].

Eman zidan xehetasun behera jarraitzeko bereziki arazo hori behar nuen guztia, eta erabili asko aurrera joatea espero dut.

</amaiera>

Nire blog Harpidetu!