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"]);

}