none
While submitting on edit form , Saved data from that item gets cleared or all the fields are set as blank

    Question

  • We have created a SharePoint List with custom new/edit forms created using sharepoint designer. Forms contains javascript/jQuery for validation and creating list items in another list based on some criteria. After executing some custom logic, i call this function WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$ctl41$g_83ec93a1_2957_4829_9ddd_7cb2ec085483$savebutton1$ctl00$diidIOSaveItem", "", true, "", "", false, true)) to save the updated values on edit form. But in some cases, all the values from that list item is getting cleared(Previous data is no longer available). 

    Also to be noted, most of the fields on the form are marked ReadOnly(Not disabled) by setting readonly="readonly" property using javascript. 

    Any help on this issues would be appreciated.

    -Manjot

    Monday, December 12, 2016 10:59 AM

Answers

  • Hi Manjot,

    Instead of using this “WebForm_DoPostBackWithOptions” function to submit the updated value, I would suggest you use JavaScript Client Object Model to the job.

    In this way, you will have the flexibility to submit the specific values you want in an asynchronous way.

    Best regards,

    Patrick

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, December 13, 2016 9:19 AM
    Moderator

All replies

  • Hi Manjot,

    Instead of using this “WebForm_DoPostBackWithOptions” function to submit the updated value, I would suggest you use JavaScript Client Object Model to the job.

    In this way, you will have the flexibility to submit the specific values you want in an asynchronous way.

    Best regards,

    Patrick

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, December 13, 2016 9:19 AM
    Moderator
  • Thanks Patrick for your valuable  suggestion, one more thing we found out . Actually that issues is coming for a particular user only. We Checked in the user profile also, all the properties are fine for that user.  

    -Manjot

    Wednesday, December 28, 2016 11:50 AM
  • Hi Manjot,

    Is there any custom logic in your code that will clear all the fields for this particular user only?

    Please create another user with the same permissions as this particular user and do the test again to see if the issue persists.

    Best regards,

    Patrick

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, January 3, 2017 1:18 AM
    Moderator
  • No Patric , there is no custom logic to clear fields. As of now we would be creating custom form. Lets c if the error still persists.

    -Manjot

    Friday, March 3, 2017 5:27 AM