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 May 15, 2023
·
9 revisions
Constructs an instance of MobileCRM.UI.DetailViewItems.TextBoxItem object.
Arguments
Argument
Type
Description
name
String
Defines the item name.
label
String
Defines the item label.
This example demonstrates how to get detail view and create new TextBoxItem.
MobileCRM.UI.EntityForm.requestObject(function(entityForm){vardetailView=entityForm.getDetailView("General");varitem=detailView.getItemByName("Description");if(item)item.value="first line \n second line";else{item=newMobileCRM.UI.DetailViewItems.TextBoxItem("Description","Description (max 2 lines)");item.value="first line \n second line";item.numberOfLines=2;detailView.insertItem(item,-1);// Place the item as the last one.}},MobileCRM.bridge.alert);MobileCRM.UI.EntityForm.onChange(function(entityForm){if(entityForm.context.changedItem=="Description"){vardetailView=entityForm.getDetailView("General");varitem=detailView.getItemByName("Description");MobileCRM.bridge.alert(item.value);// Show an alert with changed length}},MobileCRM.bridge.alert,null);