Page 1 of 1

Mode-Detection: New Form, Edit Form

Posted: 01 Nov 2021
by UDRO
Hello,

how can I detect in the Javascript-Code if a form is opened as “New Form” or as “Edit Form”. We know that It is possible to save “New Form” and “Edit Form” with differing Javascript-Code, but this is easily overwritten when all options are accidently set while saving the form.

Regards UDRO

Re: Mode-Detection: New Form, Edit Form

Posted: 02 Nov 2021
by Nikita Kurguzov
Dear UDRO,
You can check it like this:

Code: Select all

if(fd._formType() == 'New'){
  //new form code
}
else if(fd._formType() == 'Edit'){
  //edit form code
}

Re: Mode-Detection: New Form, Edit Form

Posted: 05 Nov 2021
by UDRO
Thank you, that's the code we have been looking for.

Regards, UDRO