Can I have a button execute on a transaction in ed...
# suiteflow
b
Can I have a button execute on a transaction in edit mode without saving the record? I'd like the button press to execute setting fields, but it is saying 'Changes you made may not be saved' when I hit the button.
m
I don’t think so. Could you add a checkbox then use an after field edit trigger so they check the box and the fields get set. Then save the record using native save button
n
"_Can I have a button execute on a transaction in edit mode without saving the record?_" Yes, but unless you save the record the values will not be saved, how could they be? 🤔 You could submitFields and then reload the record but any changes the user made to other fields would be lost. I would save yourself the pain and recommend you stick to View mode. What reason do you have for doing this in Edit?
k
Rather than having a button - you could have all the set field actions occur (in the current state) on a "when field changed" of a new custom checkbox or something. I'd rather script that for performance purposes, but would be a way to have a programmatic way of setting field values wtihout knowing code.