Hi, i want to addcustomview to my look up field. But its give me XML reference error. Could you tell me where is the mistake within my code:
Fetch XML:
"<fetch>"+
"<entity name='lnkt_damage' >"+
"<attribute name='lnkt_damageid' alias='DamageId' />"+
"<attribute name='lnkt_name' alias='DamageName' />"+
"<attribute name='lnkt_subdevicename' alias='SubDeviceName' />"+
"<attribute name='lnkt_device' alias='DeviceName' />"+
"<attribute name='createdon' alias='CreatedOn' />"+
"<filter>"+
"<condition attribute='lnkt_device' operator='eq' value='"+device_id+"' />"+
"<condition attribute='lnkt_subdevicename' operator='eq' value='"+subdevice_id+"' />"+
"</filter>"+
"</entity></fetch>"
Layout XML:
"<grid name='resultset' "+"object='1' " + "jump='lnkt_name' " + "select='1' " + "icon='1' " + "preview='2'>" +
"<row name='result' " + "id='lnkt_damageid'>" +
"<cell name='lnkt_name' " + "width='150' />" +
"<cell name='lnkt_subdevicename'" + "width='150' />" +
"<cell name='lnkt_device'" + "width='150' />" +
"<cell name='createdon' " + "width='100' />" + "</row>" +"</grid>"
i have make sure that the fetch XML working fine through FetchXMLBuilder
*This post is locked for comments
Hi goutam, i have find a solution for this. Actually my fetchXML is good. The problem is within layoutXML. I just remove one of the cell name, and everything goes well
Hi ,
Could you please remove the alias name from XML and also put and condition in the filter.
"<fetch version='1.0'" +
" mapping='logical'" +
" output-format='xml-platform'" +
" distinct='false'>" +
"<entity name='lnkt_damage'>" +
"<attribute name='lnkt_name'/>" +
"<attribute name='lnkt_subdevicename'/>" +
"<attribute name='lnkt_device' />" +
"<attribute name='createdon'/>" +
"<filter type='and'>" +
"<condition attribute='lnkt_device' operator='eq' value='" + device_id + "' />" +
"<condition attribute='lnkt_subdevicename' operator='eq' value='" + subdevice_id + "' />" +
"</filter>" +
"</entity></fetch>"
Here is sample code you can have a look .
https://www.inogic.com/blog/2014/09/add-custom-view-in-lookup-and-disable-all-the-other-views/
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,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156