Monday, 29 July 2013

CRM Development Toolkit issue

We are using the CRM development toolkit in our projects for sometime. Recently one of the project has stop showing the "Connect to Dynamics CRM Server" option under tools menu, not sure the exact cause of it but following actions were performed which might have caused the issue.

Defined the ALM process for the project and for this created a new crm org. Added a webservice project with in the solution of CRM dynamics project solutions. Removed silver-light project as this is not required.

Resolution:

Close the CRM project and then open the solution file in notepad and add the following lines with in the Global node.

GlobalSection(CRMSolutionProperties) = preSolution
     SolutionIsBoundToCRM = True
EndGlobalSection

Reopen the project and go to Tools and "Connect to dynamics CRM Server" option to connect to CRM server.

Wednesday, 12 June 2013

CRM utilities

Metadata document generator
https://xrmtoolbox.codeplex.com/releases/view/107901

Web-resource Manager,  lists down all the web resources which do not have dependency in system.
http://mscrmtools.blogspot.co.uk/2013/06/web-resource-manager-identify-and.html

Wednesday, 5 June 2013

xrm.page.getattribute does not support this object or method

When debugging Xrm.Page.getAttibute in console of ie debugger with breaking at a break point in console area was giving "xrm.page.getattribute does not support this object or method" error message.

Solution is to use: frames[0].Xrm.Page.getAttribute('attribute name').getValue()

http://stackoverflow.com/questions/12901795/object-doesnt-support-property-or-method-getattribute

Monday, 3 June 2013

QueryByAttribute

QueryByAttribute query = new QueryByAttribute
{
EntityName= "new_customentity",
ColumSet= new ColumnSet(new string{"new_customfield2","new_customfield3"})
};

query.Attributes.Add("new_customfield1");
query.Values.Add("value1");

EntityCollection records = crmService.ReteriveMultiple(query);

foreach(Entity record in records.Entities)
{
  
Console.WriteLine("custom field 2 " + record["new_customfield2"]);
Console.WriteLine("custom field 3 " + record["new_customfield3"]);

}