Linking Zoho Creator Apps with CRM

Linking Zoho Creator Apps with CRM

Hi,

I'm using the deluge code given on the below link to populate a drop down select field with the vendor details in my Zoho CRM.

http://zohocrm.wiki.zoho.com/Linking-Zoho-Creator-Apps-with-CRM.html

I have adapted the code slightly, but it will not save and the error message I receive is not much help - "null".

The field to be populated is called "Seller1"

The code below is the same except I have replaced MYLOGINID, MYPASSWORD, MYAPIKEY and MYCVNAME

Can anyone help? Many thanks.
  1. responseStr = getUrl(("http://accounts.zoho.com/login?servicename=ZohoCRM&FROM_AGENT=true&LOGIN_ID=MYLOGINID&PASSWORD=MYPASSWORD"));
  2. startingIndex = (responseStr).indexOf("TICKET=" + 7);
  3. endIndex = (responseStr).indexOf("RESULT");
  4. ticketStr = (responseStr).subString(startingIndex,endIndex-1);
  5. m = map();
  6. xmlString = postUrl(("http://crm.zoho.com/crm/private/xml/Vendors/getCVRecords?newFormat=1&apikey=MYAPIKEY&ticket="+ticketStr+"&cvName=MYCVNAME", m));
  7. Seller1ListStr = xmlString.executeXPath("/response/result/Vendors/row/FL[@val=\"Vendor Name\"]/text()");
  8. Seller1List = Seller1ListStr.toList("-|-");
  9. for each name in Seller1List
  10. {
  11.    Seller1.add(name);
  12. }