-
Notifications
You must be signed in to change notification settings - Fork 26
MobileCRM.UI.MultiLookupForm.show
rescocrm edited this page May 15, 2023
·
9 revisions
Shows a dialog which allows the user to select a list of entities from a configurable list of entity types.
Argument | Type | Description |
---|---|---|
success | function(obj) | The callback function that is called with chosen array of MobileCRM.Reference objects. |
failed | function(errorMsg) | The errorCallback which is called asynchronously in case of error. |
scope | Object | The scope for callbacks. |
This example demonstrates how to select products from multi-lookup form. It opens the multi-lookup form with products matching specified filter fetch.
function openMultiLookUp(orderRef) {
/// <param name='orderRef' type='MobileCRM.Reference'>A reference to a sales order entity.</param>
var filteredLeadXML = '<fetch version="1.0">' +
'<entity name="product">' +
'<filter type="and">' +
'<condition attribute="name" operator="like" value="H%" />' +
'</filter>' +
'</entity>' +
'</fetch>';
var ml = new MobileCRM.UI.MultiLookupForm("product");
ml.source = new MobileCRM.Relationship("salesorderid", orderRef);
ml.addEntityFilter("product", filteredLeadXML);
ml.allowNull = true;
ml.addView("product", "Active Products", true); // requires "Active Products" view for "product" entity in your mobile project
ml.show(function (selected) {
/// <param name='selected' type='Array<MobileCRM.Reference>'/>
}, MobileCRM.bridge.alert, null);
}