Vivos et Simplex: Praescripto a Web Site Usura SharePoint Object Model In C #

I tried searching for a little snippet code that would show how I can create a new SPWeb in a site collection. I didn’t find it as quickly or easily as I expected so I thought I’d slap together a little entry on the subject.

Hoc codice creat novum Wiki site:

 SPSite siteCollection;

    siteCollection = novum SPSite("Http://conchang-o9l8qi");

    SPWeb w = siteCollection.OpenWeb();

    w.Webs.Add("Xyzzy", "Xyzzy Title",
        "Xyzzy description", 1033, SPWebTemplate.WebTemplateWIKI, falsum, falsum);

Mea initialis searches defecit quia est vultus pro phrases sicut "praescripto a situ usura sharepoint obiectum exemplar" and the like.

Si quaerere enim "Webs.Add()", scies plura utilis Blog, MSDN articles and SDK documentation that go into depth on this subject. I definitely recommend hoc site.

</finem>

Scribet ad mea blog.

Technorati Tags:

Integrare SharePoint amet Workflows cum Web Services

Ego fuerit ludens circa cum consuetudinem actus SharePoint amet enim tempus (hic enim detailed effercio, si quod utilitatis vobis).

In current project, we need to do some fairly heavy lifting and we want to use declarative SPD workflow to manage the associated business process.

Longum brevi, this is entirely possible. I extended my Codeplex project to invoke a "helper service" and now we can invoke a web service directly from an SPD workflow.

Hic in signature:

 publica filum Dispatcher(
        Manuductione WebID, // Transierunt per runtime environment
        Manuductione SiteID, // Transierunt per runtime environment
        filum ListID, // Transierunt per RTE (Cur hoc filum, non a manuductione)
        int ListItemID, // Transierunt per RTE.
        filum XmlMessage) // Transierunt per user ut declaravit in SPD.

Hoc Aenean quod nos possit ad momenti workflow notitia, sicut site, album ID, etc. This is well documented in several places for those of you interested in creating your own custom actions. The idea is to extract the XML string as provided by the user to dispatch an appropriate procedure. Fun stuff!

Miserabile, hoc est scilicet unum modo tessera ad "Loosey Goosey" anti-exemplar terra, but it’s better than hitting a brick wall 🙂

Est an anti-exemplar si facere etiam licet scire suus an anti-exemplar?

I hope to wrap this inside Codeplex in the near future. If you’re interested in me doing so, dare me MOVEO (email aut relinquat comment) and I’ll be that more enthusiastic about doing it 🙂

</finem>

Scribet ad mea blog.

Technorati Tags: ,

Dominica Funny: “Miror si password est …”

Nuper emit prandium frater (more) and we ended up talking about funny things that we did at our respective colleges. At my alma mater, Mollis College, the academic support IT department had a very inclusive way about it. We were given a LOT of rope and I took advantage of that at times.

Duo meus ventus memorias referre ad meum bonum amicus, Gabe. He had made the terrible mistake of telling people his freshman year that "I’m a freshman, sed mihi Sophomore stantem" debitum ad variis proficiebat collocatione classes ipse erat, etc. Many of us were similarly situated but we didn’t talk about it so much. His senior year, cum introduxit eum ad populum, we’d say "This is Gabe. He’s a Senior, sed habet Sophomore stantem ".

The college had some Sun workstation/servers running X-Window. They had gigantic monitors and the engineers used them for CAD and other boring engineer stuff. We CS people used them to learn programming and, utique, ludere.

Nos non sicut computer-inops veniam ad tantum nostrum ventus quae ad esset ad telnet ad buxum sunt in et currere X-oculus on them. This would pop up a pair of eyes that followed the mouse around on the screen. You could pop up even more and have literally a dozen or more of the X-eye applications running. Conare non clare ridere cum fectum miserum X oculum claudere conatur post X oculum et sub eius flatu murmurans.

We also played X-trek on those boxes. Id, tibi ad download principium, get various dependencies wherever you could find them and build it. I wasn’t a sophisticated C programmer, but I could read header files. I was looking through these and found directives like "#DEFINE MAX_TORPEDO_DISTANCE 10". I played around with that increase range and power for phases and torpedoes, re-aedificavit et tunc perdidit Gabe altera tempore lusimus.

Gabe etiam a ingens fan de a TV ostende dicitur Blake scriptor 7. I had never seen it, Sed non dui a libero asseverantes. Who is the superior show. Argumenta nonnumquam calefieri

Unum die, it occurred to me that I could probably guess his UNIX password. I sat down next to him one day and announced in a loud tone, "Ego ad coniecto vestri password nunc, Gabe." "Yeah, ius" was his answer. I then logged in, ingressus eius user id, conversus ad coram, dactylographabam et dixit ex magna, "Miror si scriptor B-L-A-K-E-VII" ? Touch typing has never paid off as handsomely as it did that day.

Proxima septimana (aut mox): More computer room antics from college.

Tu quis ad participes? Leave a comment or email me and I’ll publish them here.

</finem>

Scribet ad mea blog.

Technorati Tags:

Simplex Explanation: “Praedae pretium non est in parte.”

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

Cum operantes cum eventus receptatores et Codicis references SharePoint album items per obiectum exemplar, Saepe erroribus quod generare hoc error ad runtime:

Error oneratisque et currit eventus susceptor Conchango.xyzzyEventReceiver in xyzzy, Version = 1.0.0.0, Culturae = neutra, 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. Autem, one simple explanation is that I’m referencing a field incorrectly. If the name of the field is "Due Date", Ego oportet respicere quasi hoc in eventus accipientis:

properties.ListItem["Due Date"]

Cum misspell vel uti iniuriam causa cum indiciunt agro, SharePoint generates the above mentioned runtime error. Verbigratia, hoc est iniuriam:

properties.ListItem["Debitum Date"]

</finem>

Scribet ad mea blog.

Technorati Tags:

Finem User Velox Tip: Modi Views in Documentum Bibliotheca, Album, etc.

Potest, debet et creare Multa in SharePoint tabulatum (document bibliothecis, consuetudinem tabulatum, 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 (Non certus sum potest), suus usque ad technicae pro typicam finem user.

Si vis ad moderari ordinem in quod SharePoint enumerat available views, simpliciter prepend a numerus vel litteras ad visum nomen, ut in:

1 – Per materiales Type
2 – Omnes Tabellae
3 – Debitum Date

-aut-

A – Per materiales Type
B – Omnes Tabellae
C – Debitum Date

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

Z_KPI_[description]

Quod facit mea "KPI" numero in extrema sententiae videri.

</finem>

Scribet ad mea blog.

Technorati Tags: ,

Dominica Funny: “Cum ego Puerulus”

Ut a parentis, alicubi in linea inveni "cum essem parvulus" trick.

Mea filius, an quatuor aut quinque dies, ludit a Balloon et sicut maxime pueri quod ludere cum Balloons, he popped it. He was very upset. The world had come to an end. I said to him, "Cum erat puer, Me a Balloon et popped et tandem, 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, Princeps, had died in a car accident. Hoc tempore, responsum erat, "Autem sentio malum de duo!" I shied away from using the "when I was a little boy" artem consolationem post quod.

Ante mortuus canis incidunt, autem, I had also started to use the technique to convince him to do chores. "Cum essem parvulus, Me ire et adepto diurna ", "Mundare mea locus", "Adepto mammam eius capulus calicem", etc.

Hoc erat pulchellus prospere enim a dum, but he started to increasingly rebel against the tyranny of my childhood. One event, in particulari, marked the end. I told him to bring the garbage cans from curb back to the garage. He argued and I responded, "Cum essem parvulus, I had to take the garbage back to the garage." He responded, "O Yeah! Well when you were a little boy, quod erat BRUTUS!".

</finem>

Scribet ad mea blog.

Technorati Tags:

Sententiis et columnas et Lists Document Libraries non potest confici

UPDATE (02/29/08): Hoc novum codeplex videtur promineant providere modus securitate singulis columnis: http://www.codeplex.com/SPListDisplaySetting. If you have any experience working with it, commodo licentia a ineo.

Posters foro frequenter interrogare huiusmodi: "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?"

Related quaestio etiam saepe petivi: "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 et MUSCUS:

  • SharePoint non praebere de-de-in-buxum captandi favorem sententiae.
  • SharePoint non praebere de-de-in-buxum praesidium securitatem columnis.

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" views. These are easy enough to set up. Autem, 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.
  • Telam et implement aliqua pars sententiam uti notitia securitatem AJAXy qr solutionem.
  • Volvite tua album propono functionality et incorporamus securitatem qr agmine gradu.
  • Modify notitia introitu usus JavaScript formis et in conjunctione cum securitate exemplar ad peragendam column-gradu salutem qr.
  • Use an InfoPath form for data entry. Implement column-level security trimming via web service calls to SharePoint and conditionally hide fields as needed.
  • Volvite introitu tuo ASP.NET notitia muneris campester quod instrumentum agmen securum qr.

Neminem eorum, qui bene magnam realiter, sed tamen si quid sequatur viam, etiam si suus 'ferreus.

MONUMENTUM: Si quis ex his descendunt semitas, 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" et dissipatum est consilium securitatem.

Si alias ideas aut potiundis experitur cum columnis views, RV email me Licentia a ineo quod puteus 'aut ego hoc update stipes ut conveniens.

</finem>

Scribet ad mea blog.

Technorati Tags:

Vivos Tip: Latin Vulgate Numbers ADF bdc sunt Amici

Si tu manum coding ADF lima facio multus of code / necessarium / test circuitus, use the version number to make your life easier.

Odi illud admittere,, sed usque hoc septimana, 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".

Verbigratia:

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

Vestibulum et Re-version important et existentem negotium notitia agmen utitur updated version automatically cum nulls configuration requisita.

</finem>

Scribet ad mea blog.

Technorati Tags:

Solutio: BDC Picker solum ostendit, unam columnam eventorum

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:

imaginem

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" munus. 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. Title) 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. Collega, 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:

<Proprietas Nomen="ShowInPicker" Typus="System.Boolean">verum</Proprietas>

In more detail:

  <!-- Title -->
  <TypeDescriptor TypeName="System.String" Nomen="Title" >
    <LocalizedDisplayNames>
      <LocalizedDisplayName LCID="1033">Title</LocalizedDisplayName>
    </LocalizedDisplayNames>
    <Proprietates>
      <Proprietas Nomen="DisplayByDefault" Typus="System.Boolean">verum</Proprietas>
      <Proprietas Nomen="ShowInPicker" Typus="System.Boolean">verum</Proprietas>
    </Proprietates>
  </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. In meam, BDC picker showed DocId by default. Autem, 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:

imaginem

(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).

Utique, 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.

</finem>

Scribet ad mea blog!

Technorati Tags: