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

addCustomView for connectionrole

$
0
0

Hello

I try to filter the connection role for connections. It actually works with "addCustomView" by other tables, but with the connectionroles the view is always defaulting to 'Applicable connection Roles' even after setting setDefaultView on this control. Is there anyway I can default to my custom view ?

If i check networktraffic in my browser, i can see that my custom fetch is loading, but the default system fetch also is loading and my custom fetch is not added in the lookup

here is my code:

function setConnectionRoles(executionContext) {
    var formContext = executionContext.getFormContext();
	var viewID = "66c0bb1e-90e1-4d56-8497-f1b8eae420c1";
	var entity = "connectionrole";

	var fetchData = {
	  "statecode": "0","category": "5"
	};
	var fetchXml = ["<fetch>","  <entity name='connectionrole'>","    <attribute name='category'/>","    <attribute name='name'/>","    <attribute name='connectionroleid'/>","    <attribute name='statecode'/>","    <filter>","      <condition attribute='statecode' operator='eq' value='", fetchData.statecode/*0*/, "'/>","      <condition attribute='category' operator='eq' value='", fetchData.category/*5*/, "'/>","    </filter>","  </entity>","</fetch>"
	].join("");

	var grid = "<grid name='resultset' object='3231' jump='name' select='1' icon='1' preview='1'>" +" <row name='result' id='connectionroleid'>" +" <cell name='name' width='200' />" +" </row>" +"</grid>";
	formContext.getControl("record2roleid").addCustomView(viewID, entity, "Connection-Roles", fetchXml, grid, true);

}

Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images