You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rescocrm edited this page Aug 2, 2024
·
10 revisions
Overrides the form's primary/secondary command button.
Arguments
Argument
Type
Description
primary
Boolean
true, for primary button; false, for secondary button.
labels
Array/String
An array of labels or single label.
callback
Function
A callback which is called when command is launched.
scope
Object
A scope, in which the callback has to be called.
This example demonstrates how to set the command buttons for a WebController. It will set two commands on primary command button for switching to previous/next tab on a form.
// Create primary command on form with two optionsMobileCRM.UI.ViewController.createCommand(true,["Previous","Next"],function(command){MobileCRM.UI.EntityForm.requestObject(function(entityForm){// Handle command and select previous/next tab on the formif(command=="Previous")entityForm.form.selectedViewIndex--;elseentityForm.form.selectedViewIndex++;returntrue;});},null);