samedi 28 février 2015

Confusion on creating custom field control in SharePoint 2013



I am very confused and Im hoping someone might be able to help.


I created a custom field type and a custom field control. I followed the code from the book "Inside Microsoft SharePoint 2013". It talked about to read and write the value of the field control to the content database to override public override object Value


But that code wasnt ever getting fired. Its also explained step by step in this MS article http://ift.tt/1BrPnd8. But I couldnt get it to work.


Then I see references on the internet to override public override void UpdateFieldValueInItem(), but this didnt work either.


But neither functions would get fired, and then I come across another article to create a OnSaveHandler SPContext.Current.FormContext.OnSaveHandler in the the overridden OnInit() method. Which neither can I find a reference in the book explaining this at all. This actually worked for me. See article http://ift.tt/1LZd3qu


So if someone could explain to me what the differences are and when to use what method when.


Thanks








0 commentaires:

Enregistrer un commentaire