Skip to content

MobileCRM.UI.EntityForm

rescocrm edited this page Feb 10, 2025 · 8 revisions

MobileCRM.UI.EntityForm Object

Represents the Javascript equivalent of native entity form object.

Properties

Property Type Description
associatedViews Array Gets the associated views as an array of MobileCRM.UI._EntityList objects.
bulkUpdateItems Array A list of entity records editted on this bulk update form.
canEdit Boolean Gets whether the form can be edited.
canClose Boolean Determines if form can be closed, i.e. there are no unsaved data being edited.
context Object Gets the specific context object for onChange and onSave handlers. The onChange context contains single property "changedItem" with the name of the changed detail item and the onSave context contains property "errorMessage" which can be used to break the save process with certain error message.
controllers Array Gets the form controllers (map, web) as an array of MobileCRM.UI._Controller objects.
detailViews Array Gets the detailView controls as an array of MobileCRM.UI._DetailView objects.
isBulkUpdateForm Boolean Indicates whether the form is bulk update form.
entity MobileCRM.DynamicEntity Gets or sets the entity instance the form is showing.
form MobileCRM.UI.Form Gets the top level form.
iFrameOptions Object Carries the custom parameters that can be specified when opening the form using MobileCRM.UI.FormManager.
isDirty Boolean Indicates whether the form has unsaved data.
relationship MobileCRM.Relationship Defines relationship with parent entity.
visible Boolean Gets whether the underlying form is visible.
documentView MobileCRM.UI._DocumentView NoteForm only. Gets the view containing the note attachment.

Methods

Method Description
cancelValidation Stops the onSave validation and optionally causes an error message to be displayed.
getController Returns the tab controller by its view name.
getDetailView Returns the DetailView by its name.
getEntityList Returns the entity list by its view name.
getMediaTab Gets the MediaTab object representing the media tab with given name.
reactivateEntity Reactivates inactive entity and reloads the form.
selectTab [v8.0] Selects the form tab by its name.
selectView Selects the associated entity list view by its name.
setTabVisibility Sets the visibility of the form tab defined by its name.
suspendPostSave [v8.2] Suspends current "onPostSave" operations and allows performing another asynchronous tasks before the form is closed.
suspendSave Suspends current "onSave" validation and allows performing another asynchronous tasks to determine the validation result
updateAddressFields Sets the address fields according to the current geo-location from platform-specific location service.

Functions

Function Description
closeWithoutSaving Closes the form ignoring all changes that have been made on it.
enableCommand Enables or disables the form command.
executeCommandByName [v8.1] Execute the command with the passed name. The command must exist and must be enabled.
isViewMaximized [v8.1] Inspects whether the passed view is maximized or restored.
leaveUiTransaction
loadTab [v10.1] (Re)loads the tab of the passed name.
maximizeView [v8.1] Makes the passed view maximized/restored.
onCanExecuteCommand Binds or unbinds the handler called when the EntityForm needs to find out whether the command can be executed (is enabled).
onChange Binds or unbinds the handler for onChange event on EntityForm.
onCommand Binds or unbinds the handler for EntityForm command.
onItemChange [v11.2] Binds or unbinds the handler for specific item change event on EntityForm.
onPostSave [v8.2] Binds or unbinds the handler for onPostSave event on EntityForm.
onProcessLoaded Binds or unbinds the handler for onProcessLoaded event on EntityForm.
onSave Binds or unbinds the handler for onSave event on EntityForm.
onSelectedViewChanged [v9.3] Binds or unbinds the handler for onSelectedViewChanged event on EntityForm.
openSalesEntityDetail [v8.2] Shows an entity edit dialog.
refreshForm Reloads the form's edit state.
requestObject Requests the managed EntityForm object.
save [v9.0]Saves the form entity and its children and refreshes the form.
saveAndClose Saves edited entity and closes the form.
selectTabEx [v8.0] Selects the form tab by its name.
setFieldValue [v18.0] Sets the field value on entity record shown on this EntityForm.
setFieldValues [v18.0] Sets several field values on entity record loaded on this EntityForm.
showPleaseWait Shows a please wait message, disabling the form except for the close command.
tryEnterUiTransaction

Objects

Objects Description
DetailCollection Provides functions accessing the collection of the sales entity details (e.g. Order details)
Clone this wiki locally