EntitySave
Save the provided entity to the persistence context
Method Signature
EntitySave(entity=[Any], forceinsert=[Boolean])Arguments
Argument
Type
Required
Description
Default
entity
Any
true
The entity instance to save.
forceinsert
Boolean
false
If true, will force an insert operation. Otherwise, a saveOrUpdate operation will be performed.
Examples
Save a New Entity
Create a new entity and persist it in one flow.
entitySave( entityNew( "Manufacturer", { name: "Audi Corp", address: "101 Audi Way" } ) );Force Insert Behavior
Use the second argument when you need explicit insert-oriented behavior.
manufacturer = entityNew( "Manufacturer", { name: "Volvo", address: "123 Main St" } );
entitySave( manufacturer, true );Related
Last updated
Was this helpful?