I am using the getRelatedRecords API call to get Notes related to a Potential (I provide a deluge PostURL call sample below for anyone who is interested)...but it would obviously be so much handier if there was a wrapper API call - that way I wouldn't have to get hold of an API Key and ticket each time.
So, I wonder could someone confirm that there is no wrapper for getRelatedRecords, and that being so... is it in the Roadmap for the future?
Here is the sample code snipppet as promised above...
...
info "************************************************************************";
info "Get Related Recs for notes realted to the last accessed potential";
info "************************************************************************";
// NOTE - PotentialID is got earlier in the code..
mapvariable = map();
theAPIKey = "95653MAINTAIN SECRET4bdc86a3";
theTicket = thisapp.globalvars.GetNamedGlobalVariable("RecentAPITicket");
theURL = "https://crm.zoho.com/crm/private/xml/Notes/getRelatedRecords?";
theURL = theURL + "newFormat=1";
theURL = theURL + "&ticket=" + theTicket;
theURL = theURL + "&apikey=" + theAPIKey;
theURL = theURL + "&parentModule=Potentials";
theURL = theURL + "&id=" + PotentialID;
info "theURL to be used is : " + theURL;
ResponseMapVariable = map();
info "Item being sent to postURL is - " + theURL;
ResponseMapVariable = postUrl(theURL, mapvariable,false);
ResponseCode = ResponseMapVariable.get("responseCode");
ResponseText = ResponseMapVariable.get("responseText");
info "ResponseCode = " + ResponseCode;
info "ResponseText = " + ResponseText;
//
// Using XML to decode the response data works fine...
//
info "These are the XML parsing results....";
xmldata = ResponseText.toXML();
strdata = xmldata.executeXPath("/response/result/Notes/row");
xmllist = strdata.toXmlList();
info "Size of List is : " + (xmllist.size());
for each r in xmllist
{
theFLNoteID = r.executeXPath("row/FL[@val=\"id\"]/text()");
theFLNoteTitle = r.executeXPath("row/FL[@val=\"Title\"]/text()");
theFLNoteContent = r.executeXPath("row/FL[@val=\"Note Content\"]/text()");
theFLCreatedTime = r.executeXPath("row/FL[@val=\"Created Time\"]/text()");
info "Note Details: " + theFLNoteID + " " + theFLNoteTitle + " " + theFLNoteContent + " " + theFLCreatedTime;
}
...