Wednesday, May 20, 2009

Call MS CRM Service through Javascript to retrieve records

debugger;var gidLocationID = event.srcElement.DataValue[0].id;
var xml = "" + "" + "http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">" + " " + " http://schemas.microsoft.com/crm/2007/WebServices\">" + " 00000000-0000-0000-0000-000000000000http://schemas.microsoft.com/crm/2007/CoreTypes\">00000000-0000-0000-0000-000000000000>" + " " + " " + " " + " http://schemas.microsoft.com/crm/2007/WebServices\">" + " http://schemas.microsoft.com/crm/2006/Query\" xsi:type=\"q1:QueryExpression\">" + " **EntitySchemaname** " + " " + " " + " ** Attrbute Name 1**" + " >** Attrbute Name 2**" + " " + " " + " " + " " + " " + " new_locationid" + " Equal" + " " + " http://microsoft.com/wsdl/types/\" xsi:type=\"q2:guid\">" + requiredGUID + " " + " " + " " + " " + " " + " " + " " +
"
" +
"
" +
"";


var xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");

xmlHttpRequest.Open("POST", "/mscrmservices/2007/CrmService.asmx", false); xmlHttpRequest.setRequestHeader("SOAPAction","http://schemas.microsoft.com/crm/2007/WebServices/RetrieveMultiple");



xmlHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
xmlHttpRequest.setRequestHeader("Content-Length", xml.length);
xmlHttpRequest.send(xml);
var resultXml = xmlHttpRequest.responseXML;


var entityNodes = resultXml.selectNodes("//RetrieveMultipleResult/BusinessEntities/BusinessEntity");

if(entityNodes.length>0)
{

var entityNode = entityNodes[0];
var att1Value = entityNode.selectSingleNode('q1:attribute1schemaname').text;
...
}

Monday, May 18, 2009

Some useful URLs in MS CRM web client

Hi,
These are some urls or paths you can make use of while creating custom applications integrated with Microsoft CRM

New Note, related entity field is mandatory
http://mscrm:5555/SaurinTestBase/notes/edit.aspx?pType=1

New Attachment
http://mscrm:5555/SaurinTestBase/notes/edit.aspx?hideDesc=1&pType=1

Advanced Find
http://mscrm:5555/SaurinTestBase/AdvancedFind/AdvFind.aspx

Wednesday, May 13, 2009

Import Subjects in MS CRM using Import tool

I got this problem of import of subject being successful but not appearing in the subject list, I googled to find out an important technique to do it:

Original reference: http://rc.crm.dynamics.com/rc/regcont/en_us/live/help/ts_import.htm


When I import subjects, why don't they appear in the list of subjects?

For imported subjects ( Categories used in a hierarchical list to correlate and organize information. Subjects are used in the subject tree to organize products, sales literature, and knowledge base articles. ) to be visible, the import source file must contain a column that maps to the Feature Mask attribute. The Feature Mask attribute determines whether the subject will be displayed in the subject tree. If Feature Mask is set to 1, the subject will be displayed. If it is empty or set to 0, the subject will not be displayed.
To build the subject hierarchy in the subject tree, you map the column in the source file that contains the title of the parent subject to the Parent Subject attribute. If no parent subject is provided, the subject will appear at the top level of the hierarchy.