Working with Microsoft Dynamics CRM Party List

Party lists are system data types and there is no supported way to modify them.

Unsupported : In order to modify party lists you need to access them in the DOM by getting their id attribute.

for instance if you want to change the filter on the “from” party list in activities, use below code on form load:

//change the default filter to account entity and disable the others parties

function FilterFromPartyList() {
  document.getElementById("from_i").setAttribute("defaulttype", "1");
  // document.getElementById("from_i").setAttribute("defaulttype", "1,2"); //+contact
 document.getElementById("from_i").setAttribute("lookuptypes", "1");
 document.getElementById("from_i").setAttribute("lookuptypeIcons", "/_imgs/ico_1 6_1.gif");
 document.getElementById("from_i").disableViewPicker = 1;
}

Here is the list of the attributes that you can access through DOM:


<img width="20" height="18" title="Select a value." class="ms-crm-InlineLookupEdit" id="from_i" alt="Select a value." src="/_imgs/search_normal.gif" isDisplayOnly="false" ForceSubmit="false" isEnableInlineLookupForEditForms="1" lookupstyle="single" lookuptypes="1" lookuptypeIcons="/_imgs/ico_16_1.gif" lookuptypenames="account:1:Account,contact:2:Contact,lead:4:Lead,systemuser:8:User" data-fdeid="PrimaryEntity" resolveemailaddress="0" attrName="from" attrPriv="7" createpermissiondictionary="account:true,contact:true,lead:true,systemuser:true" crmattributeid="ca991199-24b8-4a1f-9bd9-55fddb6dcdcd" isDeDupLookup="0" defaulttype="1" autoresolve="1" showproperty="1" allowUnresolvedPartiesOnEmailSend="0" isInline="true" inlineViewIds="undefined" allowFilterOff="0" disableMru="1" disableQuickFind="0" disableViewPicker="0" DefaultViewId="{A3AF4AB8-861D-4CFA-92A5-E6281FED7FAB}" lookupbrowse="0" lookupDialogMultipleSelect="0">

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s