JeffRohan
3 years agoQrew Cadet
Button clicked on new unsaved form
We have a button on a form in Table 1 that when clicked creates a new record in Table 2. When the button is clicked it also adds a value to a field in Table 2 using the Record ID of Table 1.
Example:
Button Action: Table1 button clicked in recordId=109
Results:
a new record is created in Table 1
Table 1 field called DIN with value="temp109".
The odd behavior is that when a new record is opened in Table 1 and the button is clicked we get an error Type=51, non unique value for the DIN field mentioned above. This is because the record in Table 1 has not been saved so it does not have a recordID and the value written into DIN is "temp'.
The issue then is that the form does not prompt to save the record first before trying to perform the button actions. If the user enters any data on the Table 1 form and then clicks the button it does prompt to save. There are workarounds but I was hoping there is some setting I haven't seen yet to force a save first before any button actions are taken.
------------------------------
Jeff Rohan
------------------------------
Example:
Button Action: Table1 button clicked in recordId=109
Results:
a new record is created in Table 1
Table 1 field called DIN with value="temp109".
The odd behavior is that when a new record is opened in Table 1 and the button is clicked we get an error Type=51, non unique value for the DIN field mentioned above. This is because the record in Table 1 has not been saved so it does not have a recordID and the value written into DIN is "temp'.
The issue then is that the form does not prompt to save the record first before trying to perform the button actions. If the user enters any data on the Table 1 form and then clicks the button it does prompt to save. There are workarounds but I was hoping there is some setting I haven't seen yet to force a save first before any button actions are taken.
------------------------------
Jeff Rohan
------------------------------