I am a newbie working on Sharepoint 2010 & trying to find out what all properties or metadata available for content items stored in it.
Till now i could find that GUID is one of them providing unique id for content but i am interested in what all properties available in it with syntax of properties e.g. sp:name or something else.
Thanks for help.
Heres the official list of properties/methods that are members of the SPListItem class. Then you can any number of additional fields (properties) available for yours items if you add them to the list of the content type it is using.
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splistitem_members(v=office.15).aspx
Related
I am trying to access the "To"-Field in the mail header while hooking into the UploadOperation of an email item in the Harmon.ie Outlook addin (to rename the file using some defaults when uploading to sharepoint).
For some reason the only header fields I get from the uploaded item are Received, Date and From.
What I currently do is iterating the IUploadItemData elements in the IWrappedList inside the onBeforeUpload handler.
Then checking for items of type IUploadMailItemData and trying to access their MetaDataValue fields using the Harmonie.SDK.MailHeader class constants as keys. But as already mentioned I only get the 3 fields Received, Date and From.
What am I doing wrong? May I load the other header fields somehow too?
Are you customer?
I am asking because our SDK is only accessible from the Enterprise edition (not the free edition, our forum is for users running the free edition).
If you are customer, please disclose the name of your company and send a support request to support#harmon.ie
----- Jean
Before I ask my question, i like to make clear what I am trying to achieve.
I have two modules i created in Sitefinity "Jobs" and "CareHomes". The CareHomes module contains fields such as "Address" , "Location" and several other information that identifies the CareHome while the Jobs module is meant to allow the client post jobs for CareHomes.
I also have a classification field/taxonomy which is also called carehomes this taxonomy is just a list of all the CareHomes operated by the client. This taxonomy field is available in both the CareHomes module and Jobs module
Now this is my problem: I want the to display information from the CareHomes module such as "Address" "Location" in the Jobs widget. That is I want a situation where when the client fills the Jobs module form and selects for example "Carehome1" in the carehomes taxonomy,I want to be able to retrieve the "address" information from the CareHomes that also has the same "Carehome1" taxonomy selected.
I know this is a forum with many professionals and my question may come across to some as silly, however I would appreciate if you are nice in answering my question or pointing me to a helpful resource because I am a newbie to Sitefinity and have only just started using it for about a few weeks.
You have a couple options, if you're stuck on 6.3 you might want to look at a dynamic items field control for the Jobs module that allows you to associate a Job to a CareHome. You can create the field using Sitefinity's Visual Studio plugin called Thunder and add it to your Jobs module. More info here. You would then have to use the api to find the associated CareHome information in your Jobs widget. There is boilerplate code to look this stuff up in module builder under Administration -> Module Builder -> {You Module} -> Code Reference, but it can be a pain.
The other option that I haven't used yet but saw in Sitefinity's last webinar is only available in Sitefintiy 7 and its the new Related Data field that is available to all custom content items and most built in content types. So you'd have to do an upgrade but the the api for getting related items appears to be much easier to work with, information on that is here and the webinar that shows the new features of Sitefinity 7 is here
I would like to find out whether a sharepoint list is created by end-user or created as part of site provisioning.
I want to show all lists created by end user into a dropdown. I could filter on template id = 100 but there are some system generated lists having templateId=100 and they end up in the dropdown list.
The SPList object does contain a Created property and the containing SPWeb does as well. Note that you won't be able to do a direct comparison because presumably it took many seconds (or even longer) to provision your site but if you did a fuzzy comparison of those two dates you should be able to separate user created vs. system provisioned lists.
(Using Ektron version 8.6.1)
Say I have a smartform ContactInfo, something like:
<ContactInfo>
<Name></Name>
<Email></Email>
</ContactInfo>
I would like to create another smartform (e.g. NewsArticle) and "embed" ContactInfo inside
<NewsArticle>
<Title></Title>
<Summary></Summary>
...
<ContactInfo>
<Name></Name>
<Email></Email>
</ContactInfo>
</NewsArticle>
My solution thus far has been to include a Resource Selector field to add a reference to an existing smartform instance. I would prefer to make the association at the configuration level, to make the data entry workflow more intuitive.
I'm using Bill Cava's ContentTypes and generating classes from smartform XSDs, so it would also make the presentation code more natural and type-safe in that embedded fields could be accessed directly (rather than having to make another request based on a reference ID, which may or may not be an ID to the smartform I'm expecting).
I gather this is not possible out of the box; I'm not opposed to hacking Workarea code to make something like this work. Does anyone have experience with a scenario like this?
I heard from an Ektron rep that they are planning on elevating the role of smartforms in an upcoming summer release - can anyone offer some more info to that point? Perhaps smartform composition like I've described will be supported?
Currently it isn't possible to do smartform composition. Depending on why/if you actually need a second smartform definition, you could just define the contact info in the news article.
If the contact info smartforms are related to the news articles in a one to many or many to many fashion, then using the resource selector as you have is the only way that I know of to create the relationship you are looking for.
If the relationship is one-to-one or many-to-one, then I'd suggest doing away with the separate smartform definition.
If you can clarify the workflow you are trying to achieve for the content authors, I might be able to respond better.
The Content Types would represent the data in the CMS. Suppose, as in your example, a NewsArticle contains a reference to a ContactInfo. Embedding the ContactInfo inside your NewsArticle might make sense from a presentation perspective, but it turns your ContentTypes into a one-way data model. You would lose the ability to construct a new NewsArticle and persist it into the CMS.
What might work well for you is to leave the content types as-is, with the id of the ContactInfo from the resource selector. Then create a NewsArticleDisplayModel... essentially a view model that contains the news article data plus ContactName and ContactEmail.
Now, if you need the contact info to be searchable, you could get really fancy with CMS Extensions and hook into the OnBeforePublish event to update searchable metadata with the name from the ContactInfo, so that the NewsArticle can be searched for using the values from the other "embedded" resource. That could get kinda tricky, though... ideally you'd have to also hook into the publish events of the ContactInfo objects in case something changes on that side, too. Then do you create a custom database table to track which NewsArticle content ids are using a particular ContactInfo?
Your solution can get as complex as it needs to, but I would keep the content blocks separate. If nothing else, you'll end up with a more maintainable and upgradable solution.
I want to create a custom field type (MyCompLookup) that will be used in lists that all users will have access to. However, the field type will be fairly complicated / confusing to a regular user who is creating a simple list in their department's site. Is there a way to restrict certain users from selecting the custom field when they are creating columns for their lists?
I'm afraid you can't set ACL on field types.
A few things you can do to achieve some kind of workaround:
Add a custom logic in SPField OnAdded method that removes the field immediately after it was added by a regular user. This method might be very confusing for users, so at least you should give a descriptive name to your field. You can find a similar solution here, where I add extra fields to the list in this method.
You can add a custom editor control (see a simple sample here) to your field, that interactsts with other controls on the add new field page, for example disables the OK button.
Hope it helps.