Field control with selector for dynamic items not saving

Posted by Community Admin on 04-Aug-2018 21:53

Field control with selector for dynamic items not saving

All Replies

Posted by Community Admin on 13-Mar-2013 00:00

Hello,
I've followed the documentation on Creating Field control with selector for dynamic items
www.sitefinity.com/.../creating-field-control-with-selector-for-dynamic-items

It all works great except when I try to 'save' the item (not via the admin UI, but by using the API by following the Code Reference generated for my custom module that is called in a seperate user control I have...

The values (Array of Guids) for this item are not saved. No exception is thrown though...

Guid opportunityId = Guid.NewGuid();
DynamicContent trackedDocumentItem = dynamicModuleManager.CreateDataItem(trackedDocumentType);
...
trackedDocumentItem.SetValue("Opp", new Guid[] opportunityId ); //Not saved
trackedDocumentItem.SetWorkflowStatus(dynamicModuleManager.Provider.ApplicationName, "Draft");
dynamicModuleManager.Lifecycle.Publish(trackedDocumentItem);
dynamicModuleManager.SaveChanges();

Has anybody encountered any issues like this? I'm using v5.2. Greatly appreciated!

Posted by Community Admin on 15-Mar-2013 00:00

Anybody? I've upgraded to 5.4 and the same still holds. Can't set the value of the dynamic item field control via the API -- it saves properly while using the UI interface though...

Posted by Community Admin on 18-Mar-2013 00:00

Anybody from Telerik please?? I'm more than happy to forward the code I have for attempting this...

Posted by Community Admin on 22-Mar-2013 00:00

I believe I found the solution to this -- I had to ensure i was using the 'MasterID' of the opporutnityId (and not just the ID of it)... not much documentation on this though...

This thread is closed