Dear Plumsail Team,
I am using Plumsail Forms in SharePoint Online. I have 2 custom buttons in the form toolbar, I would like the status of the SharePoint item to be changed to Approved and the item to be saved when the first button is clicked. The logic behind the second button is the same but the new status should be Rejected. I am not able to figure out how to accomplish that. I tried using the save method (in fd.spRendered), register to the spBeforeSave event (in fd.spRendered as part of the toolbar push button code), and added the update logic there:
fd.field(‘Status’).value = “Approved”;
From what I can see, the field on the form is updated but after the save occurs, the new status is not available in the SharePoint item. One assumption is that I have to use the spForm object provided in the spBeforeSave event but I am not sure how to do that.
Could you please advice if I am doing the right thing. A code snippet would be much appreciated!