AddNewEntityOrSave
The addNewEntityOrSave function creates or modifies an entity in a table, defined on the page or the one defined by the vt_TableName parameter if vb_UseOtherTable is set to true.
Using DevPanel :
Name
Label
Type
Description
vt_BlocNameToReloadWithNewEnity
Name of the block to be reloaded with the new entity
Text
Indicates the block containing the fields of the entity to be created and reloads it with the new entity
vt_HookBeforeSaveNewEntity
Function before saving a new entity
Text
Function to be executed before saving data.
vt_HookBeforeSaveNewEntity
Function after saving a new entity
Text
Function to be executed after data backup.
{ vt_HookAfterSaveAll }
Function after all fields have been saved
Text
Function to be executed after the entity has been saved
{ vt_HookAfter }
Action after
Text
Function to be executed after adding the entity
vb_ChangeUrl
Change URL
Boolean
Indicates whether the url should be changed
vb_UseOtherTable
Use another table
Boolean
Indicates whether another table should be used.
vt_TableName
Table name
Text
Name of the table in which to save the entity
{vt_HowGetPk}
If necessary, specify the relationship path (e.g. Entity.MyRelationship)
Text
Method for retrieving the primary key of the record.
Using from 4D:
Should not be used from within a 4D custom function. See example of entity creation using reloadBloc

