Dynamics CRM
Blank.aspx issue with IE 6.0 for CRM 4.0
If you are getting a dialog box asking to download Blank.aspx in every pop-up window in the CRM then this article is for u.
Recently, a KB cumulative hotfix (KB953838)from windows update has apparently damaged the aspx association link within Internet Explorer 6.
http://support.microsoft.com/kb/953838
If you’re seeing this issue, you can resolve the problem in either the following ways:
1) Try to first save Blank.aspx as a file to your desktop. Right-click on it, and choose to open with ‘Internet Explorer’. Make sure to check on ‘always use this…’ Failing this try either of the following:
2) Uninstall the KB patch from the user’s Add/Remove Programs
3) Install Internet Explorer 7 overtop of IE 6
4) Remote into the CRM server, and open Blank.aspx in notepad. (note: Blank.aspx can be found in: My Computer -> Program Files -> Microsoft Dynamic CRM -> CRMWeb -> _root -> Blank.aspx
On the header of Blank.aspx, add the word test and save Blank.aspx. Restart IIS, and then clear the temporary internet files of the user with the issue.
Try on of above which suits u most.
Warning message in event log for ASP.NET: The request has been aborted
We were getting following warning message in event log
Event code: 3001
Event message: The request has been aborted.
Event time: 3/5/2010 11:49:45 PM
Event time (UTC): 3/5/2010 6:19:45 PM
Event ID: b77a7fa86dda49eead52978a8d655d6e
Event sequence: 33152
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/3/ROOT-1-129122820495000000
Trust level: Full
Application Virtual Path: / Application Path: D:\Program Files\Microsoft Dynamics CRM\CRMWeb\
Machine name: <MachineName>
Process information:
Process ID: 2916
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: HttpException
Exception message: Request timed out.
Request information:
Request URL: http://CrmServer:5555/<Org_Name>/Workplace/home_activities.aspx Request path: /<Org_Name>/Workplace/home_activities.aspx
User host address: IP Address
User: domain\username
Is authenticated: True
Authentication Type: Negotiate
Thread account name: NT AUTHORITY\NETWORK SERVICE
Thread information:
Thread ID: 9
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace:
Custom event details:
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Solution:
Increasing the request execution timeout for ASP.NET solved the problem.
Steps to modify execution timeout
1. Go to IIS Manager.
2. Select Web Sites -> Microsoft Dynamics CRM
3. Right Click ->Properties
4. Select ASP.NET Tab
5. Click on Edit Configuration
6. Select Application Tab
7. Set Request execution time=1200(default is 300)
8. Click ok two times.
9. Close the IIS Manager.
This solved our problem.
Sharing records with user/team
//Set up the CRM Service.
CrmAuthenticationToken token = new CrmAuthenticationToken();
// Active Directory authentication.
token.AuthenticationType = 0;
token.OrganizationName = “AdventureWorksCycle”;
CrmService service = new CrmService();
service.Url = “http://<servername>:<port>/mscrmservices/2007/crmservice.asmx”;
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
// Create the SecurityPrincipal Object
SecurityPrincipal principal = new SecurityPrincipal();
principal.Type = SecurityPrincipalType.User;
// PrincipalId is the Guid of the user to whom access is being granted
principal.PrincipalId = new Guid(“7B222F98-F48A-4AED-9D09-77A19CB6EE82″);
// Create the PrincipalAccess Object
PrincipalAccess principalAccess = new PrincipalAccess();
// Set the PrincipalAccess Object’s Properties
principalAccess.Principal = principal;
// Gives the principal access to read
principalAccess.AccessMask = AccessRights.ReadAccess;
// Create the Target Object for the Request
TargetOwnedAccount target = new TargetOwnedAccount();
// EntityId is the Guid of the account access is being granted to
target.EntityId = new Guid(“6A92D3AE-A9C9-4E44-9FA6-F3D5643753C1″);
// Create the Request Object
GrantAccessRequest grant = new GrantAccessRequest();
// Set the Request Object’s properties
grant.PrincipalAccess = principalAccess;
grant.Target = target;
// Execute the Request
GrantAccessResponse granted = (GrantAccessResponse)service.Execute(grant);
<!--[endif]--> Display Associate View in IFrame /********** IFrame Onload *****************/
if(crmForm.FormType !=1)
{
var pPFrame = document.all.IFRAME_ProductPurchase;
var pPWindow = document.frames['IFRAME_ProductPurchase'];
document.all.IFRAME_ProductPurchase.src=”/userdefined/areas.aspx?oId=” + crmForm.ObjectId + “&oType= ” + crmForm.ObjectTypeCode + “&security=” + crmFormSubmit.crmFormSubmitSecurity.value + “&tabSet=mul_contact_mul_customerproductpurchase”;
pPFrame.name = pPFrame.id;
pPFrame.style.borderWidth = ’0px’;
pPFrame.onreadystatechange= function()
{
if(pPWindow.document.readyState == ‘complete’)
{
pPWindow.document.body.style.backgroundColor = ‘#eef0f6′;
pPWindow.document.getElementsByTagName(‘TABLE’)[0].style.borderLeftWidth = ’0px’;
}
}
}
else
{
document.all.IFRAME_ProductPurchase.src=”/aspx/IFrameMassage.htm”;
}
/*********** IFrame Code Ends Here **********************/
How to bind CRM Data to GridView on custom ASP.Net page for Microsoft Dynamics CRM
string fetch = @" <fetch mapping=""logical""> <entity name=""account""> <attribute name=""accountid""/> <attribute name=""name""/> <attribute name=""address1_line1""/> <attribute name=""address1_line2""/> <attribute name=""address1_country""/> <attribute name=""address1_city""/> </entity> </fetch>"; string result = service.Fetch(fetch); XmlDocument doc = new XmlDocument(); doc.LoadXml(result); doc.DocumentElement.Attributes.RemoveAll(); StringReader sr = new StringReader(doc.OuterXml); DataSet ds = new DataSet(); ds.ReadXml(sr); GridView1.DataSource = ds; GridView1.DataBind();
Data Audit In CRM

