ebs.generateEdit
Displays a predefined form or form driven flow that allows you to edit a specific entity record.
The displayed form or form driven flow has dedicated action handler buttons that allow you to save the record independently from the parent page.
Also see ebs.generateForm, ebs.generateInsert, ebs.generateList.
Syntax
Copy
function ebs.generateEdit(mainHtmlId: any, entityName: any, id: any, returnHash: any, newform: any, pageNo: any): void;
| Property | Type | Description |
|---|---|---|
mainHtmlId
|
string | ID of the parent HTML element where the form or form driven flow will be injected. |
entityName
|
string | Name of the entity where the record will be edited. |
id
|
string | ID of the record you wish to edit. |
returnHash(optional)
|
string | Legacy feature. No longer used. |
newForm(optional)
|
string | Name of the form or form driven flow. If left empty, the default edit form or form driven flow associated with the entity is used. |
pageNo(optional)
|
number | If the form or form driven flow has multiple sections, you can specify if you want it to open on a specific page. If left empty, the first page will be displayed. |
Examples
In this example:
- We edit the page template of a form driven flow section to include an empty div element with the editUser ID and a custom button called editThisUser.
- We use the formData.model method to retrieve the ID of the user record that is currently processed on the page (the userAccount attribute).
- In the section's After Generate tab, we include the following code that injects the default edit form of the Account entity in the div element when the button is clicked in order to edit the user account record on-demand:
Copy
$('#editThisUser').on('click', function (event) {
ebs.generateEdit('editUser', 'Account', formData.model.userAccount)})