Mandatory field setting is ignored when pressing server-side Declarative action

美月渡
Tera Contributor

【Questions】
-Does anyone have any idea what is happening below?

-Is it normal that I can submit to the server side even though "required" is set in HTML?

【Implementation details】
-Create a Form Action to display a button to update the status on WorkSpace
Form Action runs on the server side and only processes [current.state = '2'] and [current.update()].
-The form that displays the button has required fields (dictionary entry).


【event】
-When I press the button in WorkSpace, the status update process succeeds, but the status can still be updated even if the required fields are blank.

【Other confirmed details】
- Required checks are performed correctly on the OOTB "save" button (required settings are recognized as correct)
- When checking the HTML from the developer tools, "required" is set in the item input box.

 

_0-1734511183271.png

 

1 REPLY 1

美月渡
Tera Contributor

I contacted support.
It seems that running Action Assignment on the server side has the same effect as running a background script.
In other words, it ignores the form-side check.

The solution is to use a UI action, or run Action Assignment on the client side and execute the UI action processing with [g_form.save()] or [g_form.submit()].
(If you want functionality similar to the save UI action, use g_form.submit('sysverb_ws_save'))