SMS History Related List
Leads and Contacts modules in Zoho are pre-configured to display the SMS History detail view by default for individual records. For all other modules you need to manually create a function to view the SMS History details. This function can be added to the record detail page through the Related List button.
Follow these steps to create a SMS History View through the Related list button:
Follow these steps to create a SMS History View through the Related list button:
Step 1: Create a Function
- In Zoho CRM, click . The Setup page appears.
- Under Developer Space, click Functions. The Functions page appears.
- Click Create New Functions.The Create Function pop-up window appears.
- Under Choose a place, click the drop-down list to select Related List.
- Click Next.The Create Function pop-up window appears as shown.
- Do the following:
- Type a name for the function within the text area labeled Untitled_Function.
- In the text area under the Edit Arguments paste the following code:
myFieldMap = Map(); myFieldMap.put("module","smsmagic4.SMS_History"); myFieldMap.put("criteria","smsmagic4__MobileNumber:equals:" + phone_field); response = zoho.crm.invokeConnector("crm.search",myFieldMap); sms_record = response.get("response").get("data"); rowCount = 1; if(sms_record != null) { info "Got record"; responseXML = ""; for each record in sms_record { responseXML = responseXML + ""; // responseXML = responseXML + "" + record.get("id") + ""; responseXML = responseXML + "" + record.get("smsmagic4.CustomModule1_Name") + ""; responseXML = responseXML + "" + record.get("smsmagic4.MobileNumber") + ""; responseXML = responseXML + "" + record.get("smsmagic4.Direction") + ""; responseXML = responseXML + "" + record.get("smsmagic4.Status") + ""; responseXML = responseXML + "" + record.get("smsmagic4.Text") + ""; responseXML = responseXML + ""; rowCount = rowCount + 1; } responseXML = responseXML + ""; } else { info "no record "; responseXML = "No Record Found"; } return responseXML;
- Click Edit Arguments. The Edit Arguments pop-up window appears.
-
Do the following to edit the Arguments:
- Type a name for the function.
- Under the Function Arguments, add the argument name as phone_field (Do NOT change the value shown and include it as shown)
- Click the Select Type drop-down to choose string as the argument type.
- Click Save.
- Under Create Function, click Save. The Function is updated and appears under the My Function list.
Step 2: Add Function as Related List
- From the top menu bar, select a module where you want to add the related list. The Module page appears.
- Click a record and scroll to the end of the page.
- Click Add Related List. The Add Related List pop-up window appears.
- Click Functions. The Functions pop-up window appears displaying the list of available functions.
- Click the Function you want to select. The Configure Functions pop-up window appears.
- Under Argument Mapping, select the argument name and value. For example, phone_field, phone.
- Click Save. The Create Custom Related List pop-up window appears.
- Type a name for the Related list.
- Click Save.The SMS History record related to the selected record appears.
0 Comments