Search This Blog

Thursday, November 23, 2017

Open Lookup window in CRM V9.0

XRM.Utlity

Property Name
Type
Required
Description
allowMultiSelect
Boolean
No
Indicates whether the lookup allows more than one item to be selected.
defaultEntityType
String
No
The default entity type to use.
defaultViewId
String
No
The default view to use.
entityTypes
Array
No
The entity types to display.
showBarcodeScanner
Boolean
No
Indicates whether the lookup control should show the barcode scanner in mobile clients.
viewIds
Array
No
The views to be available in the view picker. Only system views are supported.

Xrm.Utility.lookupObjects(lookupOptions).then(successCallback, cancelCallback)
var lookupOptions =new Object();
lookupOptions.allowMultiSelect=false
lookupOptions.defaultEntityType='contact'
var arr=new Array()
arr.push('A2D479C5-53E3-4C69-ADDD-802327E67A0D')
lookupOptions.viewIds=arr

lookupOptions.defaultViewId='A2D479C5-53E3-4C69-ADDD-802327E67A0D'

var arr2=new Array();
arr2.push('contact');
lookupOptions.allowMultiSelect=false;
lookupOptions.entityTypes=arr2;
Xrm.Utility.lookupObjects(lookupOptions).then(successCallback, cancelCallback)
function successCallback(objResult){debugger;

}
function cancelCallback(){}






















No comments:

Post a Comment

Note: Only a member of this blog may post a comment.