Thank you for asking. The field names are correct, but for this illustration I have added sample fields to help you understand what column types are used. When the user clicks the "HOT SAVE - Ready for Review" BUTTON, the fields shown need to be changed. The button works correctly with one field, but additional lines throw an error and the form does not save.
I failed to mention that I am using Power Automate currently to make these changes, but I would like to accomplish this with JavaScript, as the Power Automate puts me in an endless loop of "modify list".
Dear @shedev,
Well, you're not using correct field names from what I can see. For example, correct field Name is Stage, but you use stage instead. Letter capitalization is important.
requestreview is the correct name, and the capitalization is correct.
I also don't find fields with a Name like color, food, peoplepicker, or number, not for either types of capitalization (only found CMSAssignedItemNumber field).
@Nikita_Kurguzov - Yes, you are correct. Sorry for the confusion. I used those as sample fields for illustration. Where I am stuck is the user field. I suspect that my code requires maybe a Lookup or User reference. As you noted, here are the actual fields. Where it fails is "fd.field('volunteer').value = 'user@domain.com';"
Dear @shedev ,
The issue is that setting Person field is an async request - it takes time to find the correct user by their email, and the rest of the code executes before that happens, even if takes less than a second.
Please, try the following, it should trigger save only after field value changes and only if the form is valid (or it will give an error):