Monday, November 10, 2014

Multi level of Cascading dropdown in OOB using SPService

Hi,
We are facing problem for cascade dropdown in multiple level using OOB feature. I have one requirement where i need to implement
cascade dropdown in my project. So i have implemented as below.

<script type="text/javascript" src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/2014.01/jquery.SPServices.min.js"></script>

<script type="text/javascript">
$(document).ready(function(){
$().SPServices.SPCascadeDropdowns({
relationshipList: "LocationMaster",
relationshipListParentColumn: "Country",
relationshipListChildColumn: "Title",
parentColumn: "Country",
childColumn: "Location",
debug:true
});
$().SPServices.SPCascadeDropdowns({
relationshipList: "StorageMaster",
relationshipListParentColumn: "Location",
relationshipListChildColumn: "Title",
parentColumn: "Location",
childColumn: "Storage",
debug:true
});
})
</script>

Wednesday, November 5, 2014

Add Multiline Text with Enhance Rich option in Clintobject Model

Create Multiline Text

Field styleField = list.Fields.AddFieldAsXml("", true, AddFieldOptions.DefaultValue);
FieldMultiLineText fieldMultiLineText = context.CastTo(styleField);
fieldMultiLineText.RichText = true;
fieldMultiLineText.AllowHyperlink = true;
fieldMultiLineText.UpdateAndPushChanges(true);
list.Update();
context.ExecuteQuery();


Create Multiline Text with ich text option
Field styleField = list.Fields.AddFieldAsXml("", true, AddFieldOptions.DefaultValue);
FieldMultiLineText fieldMultiLineText = context.CastTo(styleField);
fieldMultiLineText.RichText = true;
fieldMultiLineText.AllowHyperlink = true;
fieldMultiLineText.UpdateAndPushChanges(true);
list.Update();
context.ExecuteQuery();


created Enhanced rich text column and use the SchemaXML to generate the new field:

Field rtfField = list.Fields.AddFieldAsXml("" , true, AddFieldOptions.DefaultValue);
rtfField.UpdateAndPushChanges(true);list.Update();
context.ExecuteQuery();


RestrictedMode=\"TRUE\" RichText=\"TRUE\" RichTextMode=\"FullHtml\"