Hi Friends,
Can some one suggest me how to get LayoutXml from Advanced find by clicking source F12???
Thanks and Regards,
*This post is locked for comments
Hi Friends,
Can some one suggest me how to get LayoutXml from Advanced find by clicking source F12???
Thanks and Regards,
*This post is locked for comments
Thanks guys!!!
Hi Raghuveer,
After reading the comments i found that you want to filter the lookup values based on FetchXml Query . I Too had a same requirement in my project work.
I have written a blog on this :
crmpankaj.blogspot.in/.../crm-2015-javascript-lookup-filtering.html
Hope this would solve your problem
You don't need any layoutxml to setup filter lookup view, you can simply use set filter like this: blogs.msdn.com/.../addpresearch-and-addcustomfilter-in-crm-2013.aspx
In case you looking for old approach there we used to do before (but not sure why you are looking for that), you can refer: crmdm.blogspot.ae/.../lookup-filtering-in-crm-2011-using.html
Thanks
function setFilterSampleLookup()
{
var viewId = Xrm.Page.getControl("Sample").getDefaultView();
var entityName = "Sample";
var viewDisplayName = "Sample";
var fetchXml = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>" +
"<entity name='Sample'>" +
"<attribute name='Sample' />" +
"<attribute name='Sample' />" +
"<attribute name='createdon' />" +
"<order attribute='Sample' descending='false' />" +
"<filter type='and'>" +
"<condition attribute='statecode' operator='eq' value='0' />" +
"</filter>" +
"</entity>" +
"</fetch>";
var layoutXml = "<grid name='resultset' object='10116' jump='hbs_name' select='1' icon='1' preview='1'><row name='result' id='hbs_activityclassificationid'><cell name='hbs_name' width='300' /><cell name='createdon' width='125' /></row></grid>";
document.getElementById("Sample").setAttribute("defaulttype", "10116");
document.getElementById("Sample").setAttribute("lookuptypes", "10116");
Xrm.Page.getControl("Sample").addCustomView(viewId, entityName, viewDisplayName, fetchXml, layoutXml, true);
document.getElementById("Sample").disableViewPicker = 1;
Hi Mahen,
I added a ribbon button to connect button drop down on organisations form and now i am trying to default the lookup view to show related entity.
So i am writing a java script to default the lookup view.
I need Fetch Xml and Layout Xml to use in my JS.
I got the Fetch Xml for Advanced find.
Are you trying to get the fetchXML? if yes, while you are on the query builder screen, you can click download fetch xml to get the XML. If no, please explain your requirement.
What do you mean by layoutxml ?? what is your requirement ??
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,269 Super User 2024 Season 2
Martin Dráb 230,198 Most Valuable Professional
nmaenpaa 101,156