+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Field control with selector for dynamic items not saving

Field control with selector for dynamic items not saving

4 posts, 1 answered
  1. Rico
    Rico avatar
    88 posts
    Registered:
    30 Aug 2012
    13 Mar 2013
    Link to this post
    Hello,
    I've followed the documentation on Creating Field control with selector for dynamic items
    http://www.sitefinity.com/documentation/documentationarticles/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!
  2. Rico
    Rico avatar
    88 posts
    Registered:
    30 Aug 2012
    15 Mar 2013
    Link to this post
    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...
  3. Rico
    Rico avatar
    88 posts
    Registered:
    30 Aug 2012
    18 Mar 2013 in reply to Rico
    Link to this post
    Anybody from Telerik please?? I'm more than happy to forward the code I have for attempting this...
  4. Rico
    Rico avatar
    88 posts
    Registered:
    30 Aug 2012
    22 Mar 2013
    Link to this post
    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...
    Answered
4 posts, 1 answered