Using ISV.config to access field values in CRM

First of all open your isv.config file ( found at <installation path\_Resources\isv.config e.g. C:\Program Files\Microsoft CRM\CRMWeb\_Resources”

Here we are adding buttons in the form toolbar for opportunity, inside the isv.config file (Plzz take it’s backup)

Add the following

<Entity name=”opportunity”>

<ToolBar ValidForCreate=”0″ ValidForUpdate=”1″>

<Button Title=”MyBtn1″ Icon=”/_imgs/ico_18_debug.gif”

Url=”http://default.aspx” PassParams=”1″ WinParams=”” WinMode=”0″ AvailableOffline=”false” />

<Button Title=”my button” ToolTip=”Advanced Mail Merge” Icon=”url” Client=”Web, Outlook”



var objectID=crmForm.ObjectId;‘http://Default.aspx?name=’+n+’&oId=’+objectID)”




In the above code we have created two button.

First button makes use of URL and passParam attribute.

When we set passParam as 1 then objectid( id of the record), object name and object type code are passed to url specified as query string.

The thing here is that in our custom web page we can only get the id and the type of entity.

What if we want values of other form fields.

Well in this case we can make use of JavaScript attribute.This attribute will override the Url attribute if in case both of them are defined.In the above code we are attaching the name value of opportunity in the query string.

One more thing to get the current record’s primary key i.e. say opportunity id for opportunity we’ll use crmForm.ObjectId

We can even user window.opener object in javascript of our isv custom page.

Chk this


Finding Lead records that have an associated activity with them

Here in the query one more condition is added which is when the Rating is Hot. 

select leadqualitycodename,* from filteredlead As fl inner join dbo.FilteredActivityParty as fap
ON fl.leadid=fap.partyid
and fl.leadid=‘yourleadid’ and leadqualitycodename=‘Hot’ 

Finding all the opportunities shared with the user in CRM

To find the opportunity record shared with a particular user in Microsoft Dynamics Crm

select as OpportunityName,p.AccessRightsMask from opportunityBase o
left join PrincipalObjectAccess
p on p.objectid=o.opportunityid left join systemuser u
on p.principalid=u.systemuserid where u.fullname=’nishant r’

or u.domainname=SYSTEM_USER

AccessRightsMask values and what they mean

AppendAccess 4 – Specifies the right to append the specified object to another object.
AppendToAccess 8 – Specifies the right to append another object to the specified object.
AssignAccess 0x80 -Specifies the right to assign the specified object to another security principal.
CreateAccess 0x10 -Specifies the right to create an instance of the object type.
DeleteAccess 0x20 -Specifies the right to delete the specified object.
ReadAccess 1 -Specifies the right to read the specified type of object.
ShareAccess 0x40 -Specifies the right to share the specified object.
WriteAccess 2 – Specifies the right to update (write to) the specified object.

3– Read + Write

65539– Read + Write + Delete

851991– All the rights

262145– Share+Read etc…

फिर मिलते हें