Tuesday, August 20, 2013

Case Sensitive in SharePoint

I actually didn't know about some areas in SharePoint using declaration with case-sensitive until today I work on List Definition and Custom Activity.

1) When we define a new list, we must define the list of fields and their properties. Especially in the schema for field, take a look the definition schema field by MSDN:

<Field
  ID = "Text"  Id = "Text"
  Type = "Data_Type"
  ...>
</Field>


Where:
ID: is the GUID of the field and put it into {...}
Id: is the text optional

The confusing thing is if you define the field with type is different from Lookup, you might use Id instead of ID. But if you declare the type is Lookup, you must use ID unless the feature couldn't be activated. Althought Id is the optional text but you are still able to use as ID.

2) If you code a custom activity and need it to be availabe on SharePoint Designer while you are designing a workflow, you must define the mapping type in WSS.ACTION file (you can find here C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\1033\Workflow)

The most important thing is all declarations in this file are case-sensitive and you must correct it before to use. It took me some hours to find out the error because I defined ID instead of Id in the field binding

        <FieldBind Field="Error" Text="this message" Id="1" DesignerType="TextBox"/>


That's awesome!

No comments: