Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 55831

How to set custom lookup in CRM 2015?

$
0
0

Dear Experts,

I am trying to set custom lookup in CRM 2015, but it giving me 'Invalid Child Node' Error.

Following is the code i'm using to set this custom lookup:

var viewId = "{83CACDAE-BEA6-4F29-91D9-97FF93210759}";
var entityName = "new_policy";
var viewDisplayName = "Policies List for " + Clientname + "";

var fetchXml = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'>" +
"<entity name='new_policy'>" +
"<attribute name='new_name' />" + //added new
"<order attribute='new_name' descending='false' />" +  // change from new_employeeid
"<condition attribute='new_ClientName' operator='eq' value='" + Clientid + "' />" +
"</entity>" +
"</fetch>";
var layoutXml = "<grid name='resultset' " +
                                   "object='1' " +
                                   "jump='new_policyId' " +
                                   "select='1' " +
                                   "icon='1' " +
                                   "preview='1'>" +
                                   "<row name='result' " +
                                   "id='new_policyId'>" +
                                   "<cell name='new_name' " +
                                   "width='150' />" +
                                   //"<cell name='new_VantagePolicynumber' " +
                                   //"width='150' />" +
                                   "</row>" +
                                   "</grid>";

Xrm.Page.getControl("new_policyid").addCustomView(viewId, entityName, viewDisplayName, fetchXml, layoutXml, true);


Please suggest that what i'm missing in the code.

Regards,

Jayesh


Viewing all articles
Browse latest Browse all 55831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>