lead_records = zoho.crm.getRecordById("Deals",id);
// info lead_records ;list1 = list();
CML = ifnull(lead_records.get("CML"),"False");
// info CML ;
PML = ifnull(lead_records.get("PML"),"False");
CRL = ifnull(lead_records.get("CRL"),"False");
DL = ifnull(lead_records.get("DL"),"False");
if(CML == false)
{
CML = "No";
list1.add(CML);
}
else
{
CML = "Yes";
list1.add(CML);
}
if(CRL == false)
{
CRL = "No";
list1.add(CRL);
}
else
{
CRL = "Yes";
list1.add(CRL);
}
if(PML == false)
{
PML = "No";
list1.add(PML);
}
else
{
PML = "Yes";
list1.add(PML);
}
if(DL == false)
{
DL = "No";
list1.add(DL);
}
else
{
DL = "Yes";
list1.add(DL);
}
info "list data" + list1;
responseXML = "";
// rowVal = 0;
responseXML = responseXML + "<record>";
// for each data in list1
// {
info "data =" + list1;
responseXML = responseXML + "<row cnt='" + 0 + "'><FL val='License Type'>" + "CML" + "</FL><FL val='Approval'>" + list1.get(0) + "</FL><FL val='Notes'>" + "</FL><FL val='Date'>" + "</FL></row>";
responseXML = responseXML + "<row cnt='" + 1 + "'><FL val='License Type'>" + "CRL" + "</FL><FL val='Approval'>" + list1.get(1) + "</FL><FL val='Notes'>" + "</FL><FL val='Date'>" + "</FL></row>";
responseXML = responseXML + "<row cnt='" + 2 + "'><FL val='Customer Name'>" + "PML" + "</FL><FL val='Approval'>" + list1.get(2) + "</FL><FL val='Notes'>" + "</FL><FL val='Date'>" + "</FL></row>";
responseXML = responseXML + "<row cnt='" + 3 + "'><FL val='Customer Name'>" + "DL" + "</FL><FL val='Approval'>" + list1.get(3) + "</FL><FL val='Notes'>" + "</FL><FL val='Date'>" + "</FL></row>";
// rowVal = rowVal + 1;
// }
responseXML = responseXML + "</record>";
info responseXML;
return responseXML;
Comments
Post a Comment