{"id":509,"date":"2019-10-04T05:23:36","date_gmt":"2019-10-04T05:23:36","guid":{"rendered":"https:\/\/staging.txtbox.in\/docs\/zoho\/?post_type=lsvr_kba&#038;p=509"},"modified":"2020-04-24T05:20:31","modified_gmt":"2020-04-24T05:20:31","slug":"sms-history-related-list","status":"publish","type":"lsvr_kba","link":"https:\/\/staging.txtbox.in\/docs\/zoho\/knowledge-base\/sms-history-related-list\/","title":{"rendered":"SMS History Related List"},"content":{"rendered":"\n<span>\nLeads 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.\n<br>\nFollow these steps to create a SMS History View through the Related list button:\n<\/span>\n<p>\n<h4>Step 1: Create a Function<\/h4><\/p>\n<ol>\n<li>In Zoho CRM, click <img decoding=\"async\" src=\"https:\/\/staging.txtbox.in\/docs\/zoho\/wp-content\/uploads\/sites\/3\/2019\/10\/setup.png\">. The Setup page appears.\n<img decoding=\"async\" src=\"https:\/\/staging.txtbox.in\/docs\/zoho\/wp-content\/uploads\/sites\/3\/2019\/10\/sms-history-1.png\">\n<\/li>\n<li>Under <b>Developer Space<\/b>, click <b>Functions<\/b>. The <b>Functions<\/b> page appears.\n<img decoding=\"async\" src=\"https:\/\/staging.txtbox.in\/docs\/zoho\/wp-content\/uploads\/sites\/3\/2019\/10\/sms-history-2.png\">\n<\/li>\n<li>Click <b>Create New Functions<\/b>.The <b>Create Function<\/b> pop-up window appears.\n<img decoding=\"async\" src=\"https:\/\/staging.txtbox.in\/docs\/zoho\/wp-content\/uploads\/sites\/3\/2019\/10\/sms-history-3.png\">\n<\/li>\n<li>Under <b>Choose a place<\/b>, click the drop-down list to select <b>Related List<\/b>.<\/li>\n<li>Click <b>Next<\/b>.The <b>Create Function<\/b> pop-up window appears as shown.\n<img decoding=\"async\" src=\"https:\/\/staging.txtbox.in\/docs\/zoho\/wp-content\/uploads\/sites\/3\/2019\/10\/sms-history-4.png\">\n<\/li>\n<li>Do the following:\n<ul>\n<li>Type a name for the function within the text area labeled <b>Untitled_Function<\/b>.<\/li>\n<li>In the text area under the <b>Edit Arguments<\/b> paste the following code:\n<pre>myFieldMap = Map();\n\nmyFieldMap.put(\"module\",\"smsmagic4.SMS_History\");\n\nmyFieldMap.put(\"criteria\",\"smsmagic4__MobileNumber:equals:\" + phone_field);\n\nresponse = zoho.crm.invokeConnector(\"crm.search\",myFieldMap);\n\nsms_record = response.get(\"response\").get(\"data\");\n\nrowCount = 1;\n\nif(sms_record != null)\n\n{\n\n info \"Got record\";\n\n responseXML = \"\";\n\n for each  record in sms_record\n\n {\n\n         responseXML = responseXML + \"\";\n\n         \/\/                 responseXML = responseXML + \"\" + record.get(\"id\") + \"\";\n\n         responseXML = responseXML + \"\" + record.get(\"smsmagic4.CustomModule1_Name\") + \"\";\n\n         responseXML = responseXML + \"\" + record.get(\"smsmagic4.MobileNumber\") + \"\";\n\n         responseXML = responseXML + \"\" + record.get(\"smsmagic4.Direction\") + \"\";\n\n         responseXML = responseXML + \"\" + record.get(\"smsmagic4.Status\") + \"\";\n\n         responseXML = responseXML + \"\" + record.get(\"smsmagic4.Text\") + \"\";\n\n         responseXML = responseXML + \"\";\n\n         rowCount = rowCount + 1;\n\n }\n\n responseXML = responseXML + \"\";\n\n}\n\nelse\n\n{\n\n info \"no record \";\n\n responseXML = \"No Record Found\";\n\n}\n\nreturn responseXML;<\/pre>\n<br>\n<div class=\"c-alert-message\">\nPrior to copying the function in the text area, remove the default code text &#8221; Return &#8221; &#8220;; &#8221; displayed. If not removed, you will receive an error and the function will not be saved properly.\n<\/div>\n<br>\n<\/li>\n<\/ul>\n<\/li>\n<li>Click <b>Edit Arguments<\/b>. The <b>Edit Arguments<\/b> pop-up window appears.\n<img decoding=\"async\" src=\"https:\/\/staging.txtbox.in\/docs\/zoho\/wp-content\/uploads\/sites\/3\/2019\/10\/sms-history-5.png\">\n<\/li>\n<li>\nDo the following to edit the Arguments:\n<ul>\n<li>Type a name for the function.<\/li>\n<li>Under the Function Arguments, add the argument name as phone_field (Do NOT change the value shown and include it as shown)<\/li>\n<li>Click the <b>Select Type<\/b> drop-down to choose string as the argument type.<\/li>\n<li>Click <b>Save<\/b>.<\/li>\n<\/ul>\n<\/li>\n<li>Under <b>Create Function<\/b>, click <b>Save<\/b>. The Function is updated and appears under the <b>My Function<\/b> list.<\/li>\n\n<\/ol>\n<img decoding=\"async\" src=\"https:\/\/staging.txtbox.in\/docs\/zoho\/wp-content\/uploads\/sites\/3\/2019\/10\/sms-history-6.png\">\n<br><br>\n<h4>Step 2: Add Function as Related List<\/h4>\n<ol>\n<li>From the top menu bar, select a module where you want to add the related list. The <b>Module<\/b> page appears.\n<img decoding=\"async\" src=\"https:\/\/staging.txtbox.in\/docs\/zoho\/wp-content\/uploads\/sites\/3\/2019\/10\/sms-history-7.png\">\n<\/li>\n<li>Click a record and scroll to the end of the page.<\/li>\n<li>Click <b>Add Related List<\/b>. The <b>Add Related List<\/b> pop-up window appears.\n<img decoding=\"async\" src=\"https:\/\/staging.txtbox.in\/docs\/zoho\/wp-content\/uploads\/sites\/3\/2019\/10\/sms-history-8.png\">\n<\/li>\n<li>Click <b>Functions<\/b>. The <b>Functions<\/b> pop-up window appears displaying the list of available functions.\n<img decoding=\"async\" src=\"https:\/\/staging.txtbox.in\/docs\/zoho\/wp-content\/uploads\/sites\/3\/2019\/10\/sms-history-9.png\">\n<\/li>\n<li>Click the Function you want to select. The <b>Configure Functions<\/b> pop-up window appears.\n<img decoding=\"async\" src=\"https:\/\/staging.txtbox.in\/docs\/zoho\/wp-content\/uploads\/sites\/3\/2019\/10\/sms-history-10.png\">\n<\/li>\n<li>Under <b>Argument Mapping<\/b>, select the argument name and value. For example, phone_field, phone.<\/li>\n<li>Click <b>Save<\/b>. The <b>Create Custom Related List<\/b> pop-up window appears.<\/li>\n<li>Type a name for the <b>Related list<\/b>.<\/li>\n<li>Click <b>Save<\/b>.The SMS History record related to the selected record appears.<\/li>\n<\/ol>\n<img decoding=\"async\" src=\"https:\/\/staging.txtbox.in\/docs\/zoho\/wp-content\/uploads\/sites\/3\/2019\/10\/sms-history-11.png\">\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"lsvr_kba_cat":[24],"lsvr_kba_tag":[41,32],"class_list":["post-509","lsvr_kba","type-lsvr_kba","status-publish","format-standard","hentry","lsvr_kba_cat-zoho-sms-history","lsvr_kba_tag-sms-history","lsvr_kba_tag-zoho"],"_links":{"self":[{"href":"https:\/\/staging.txtbox.in\/docs\/zoho\/wp-json\/wp\/v2\/lsvr_kba\/509","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/staging.txtbox.in\/docs\/zoho\/wp-json\/wp\/v2\/lsvr_kba"}],"about":[{"href":"https:\/\/staging.txtbox.in\/docs\/zoho\/wp-json\/wp\/v2\/types\/lsvr_kba"}],"author":[{"embeddable":true,"href":"https:\/\/staging.txtbox.in\/docs\/zoho\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/staging.txtbox.in\/docs\/zoho\/wp-json\/wp\/v2\/comments?post=509"}],"version-history":[{"count":2,"href":"https:\/\/staging.txtbox.in\/docs\/zoho\/wp-json\/wp\/v2\/lsvr_kba\/509\/revisions"}],"predecessor-version":[{"id":613,"href":"https:\/\/staging.txtbox.in\/docs\/zoho\/wp-json\/wp\/v2\/lsvr_kba\/509\/revisions\/613"}],"wp:attachment":[{"href":"https:\/\/staging.txtbox.in\/docs\/zoho\/wp-json\/wp\/v2\/media?parent=509"}],"wp:term":[{"taxonomy":"lsvr_kba_cat","embeddable":true,"href":"https:\/\/staging.txtbox.in\/docs\/zoho\/wp-json\/wp\/v2\/lsvr_kba_cat?post=509"},{"taxonomy":"lsvr_kba_tag","embeddable":true,"href":"https:\/\/staging.txtbox.in\/docs\/zoho\/wp-json\/wp\/v2\/lsvr_kba_tag?post=509"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}