Need help
Hi All,
I am trying to retrieve Multiple records using context.WebApi using query option as fetchXml but it giving an error like fetchXml not supported
Info
var _This=this
let fetchXML="<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>"+
"<entity name='ttt_financeitemmaster'>"+
"<attribute name='ttt_financeitemmasterid' alias='financemasterid'/>"+
"<attribute name='ttt_name' alias='name'/>"+
"<order attribute='ttt_name' descending='false' />"+
"<filter type='and'>"+
"<condition attribute='ttt_type' operator='in'>"+
"<value>918360002</value>"+
"<value>918360000</value>"+
"</condition>"+
"</filter>"+
"</entity>"+
"</fetch>";
context.webAPI.retrieveMultipleRecords('ttt_financeitemmaster','?$fetchXml='+fetchXML)
.then(
function(value: ComponentFramework.WebApi.RetrieveMultipleResponse) {
value.entities.forEach(entity=>{
let option=document.createElement('option')
option.innerHTML=String(entity.name)
option.setAttribute('datVal',String(entity.financemasterid))
_This.ofrItemDD.appendChild(option)
})
_This.myDiv.appendChild(_This.ofrItemDD)
}
,function(reason: any){
console.clear()
console.log('Error prom PCF',reason)
alert(reason)
})