It is a FormLayout with submit button, that works as a standalone: validation before the startprocess is fired.
However, if I make it an interface called from a record view, it stops working: the process starts without the validation being done (basic "required" info).Here is the simplified code for the form:
a!formLayout( contents: { a!columnsLayout( columns: { a!columnLayout( contents: { a!textField( label: "Numéro article", labelPosition: "ADJACENT", value: ri!record['recordType!{b3cc31cc-1595-401f-b13c-16b953dd1f5b}ED Projet.fields.{b0296e3d-29b7-42e8-acd8-a99e9fd26649}budgetPrevisionnel'], saveInto: ri!record['recordType!{b3cc31cc-1595-401f-b13c-16b953dd1f5b}ED Projet.fields.{b0296e3d-29b7-42e8-acd8-a99e9fd26649}budgetPrevisionnel'], required: true ), }, ), }, ), }, buttons: a!buttonLayout( primaryButtons: { a!buttonWidget( label: "do", saveInto: { a!startProcess( processModel: cons!ED_PM_PROJET_CREATE, processParameters: { cancel: false, projet: ri!record, }, ) }, submit: true, validate: true ) }, ) )
The interface has good behaviour (validation fires) as a standalone when I test it,
but when I call it from the record view, it doesn't work anymore.
How could I make it work as I thought it would? I really need this button to start manually the process, because I want to redirect to another record, and I don't know if Appian will let me do this with normal actions.Thanks!
Discussion posts and replies are publicly visible
Using a!startProcess in a button that also has submit=true makes not much sense for me. What do you try to achieve with this?
I try to have validation on the form fields.
In fact, removing the submit=true solves the issue, but still, it puzzles me that it works in unit test, but fails in the record view context.
Thanks a lot!
In fact, I have the submit=true for the case it is called as a start form. But I can make the value depend on how I call the interface.