My Photo

Microsoft Dynamics 365

Official Blog for Microsoft Dynamics Functional and Technical Solutions....
Browsing Category " open lookup dialoge using js "

Dynamics 365 V9 : New feature lookupObjects (Xrm.Utility.lookupObjects)

Opens a lookup control to select one or more items.
Microsoft dynamics 365 V9.0 has enhanced many existing features in CRM online and has also introduced new features. Xrm.Utility namespace has also been enhanced with new feature like
and LookupObjects.

Lets take an example creating new field in account "new_lookupfilter"  when write js on change of this field (if we enter 'admin' it will open an lookup dialog of contact entity and we can modify it i.e multi-select E.T.C )

Now  selected record can be set to any other field.


function lookUpobjectTest() {
    // Set properties here
    var lookupOptions = {
        defaultEntityType: "contact",
        defaultViewId: "{608861bc-50a4-4c5f-a02c-21fe1943e2cf}", // GUID of the View
        viewIds: ["{00000000-0000-0000-0000-000000000000}",
                        "{00000000-0000-0000-0000-000000000000}"], // GUID of the View
        entityTypes: ["contact", "incident"],
        allowMultiSelect: true

Hope this was Helpful. Thanks