ebs.setFormAttributeValue
Sets the value of an attribute on an entity form.
IMPORTANT!
For most use cases, it is recommended to work with the formData.model property directly.
The ebs.setFormAttributeValue is a global function which means it can be used in some exceptional cases where the formData object is not available, such as when debugging in the browser console or when writing a fetch in a the After Generate attribute of a view that is going to be rendered in a form.
For most use cases, it is recommended to work with the formData.model property directly.
The ebs.setFormAttributeValue is a global function which means it can be used in some exceptional cases where the formData object is not available, such as when debugging in the browser console or when writing a fetch in a the After Generate attribute of a view that is going to be rendered in a form.
Syntax
Copy
ebs.setFormAttributeValue(formId: string, attributeName: string, value: any): void
| Parameter | Description |
|---|---|
formId
|
The ID of the entity form on which we set the value of the specified attribute. |
attributeName
|
The name of the attribute for which the value is set. |
value
|
The value to be set. |
Response
| Key | Description |
|---|---|
IsSuccess
|
Indicates if the value of the attribute was successfully set. |
Example
In this example:
- We have an entity form (e.g. Account) which contains an attribute called "name".
- On the entity form, we'll set the value of the "name" attribute to "John".
Copy
ebs.setFormAttributeValue("ebsContainerContent","name","John");