Extension Pointers JS SDK Series #3: Delinking a related record in a Zoho CRM module from a widget

Extension Pointers JS SDK Series #3: Delinking a related record in a Zoho CRM module from a widget

In synchronization, it is important to be able to associate and dissociate the required data at the appropriate times. In our previous post, we mentioned the method to fetch related records in a Zoho CRM module from a widget. In this post, we will explain the process of delinking a related record for a Zoho CRM module from a widget, which is the reverse process to the previous post. Associating data between modules and establishing related records in your Zoho CRM is a common action, but you may sometimes no longer require the information from a particular related record. Instead of completely deleting the unnecessary related records from your Zoho CRM, you can perform a simple delinking process, and still retain the details in Zoho CRM. 

ZOHO.CRM.API.delinkRelatedRecord(config) is used to delink a record from its related list record details.

Syntax:

ZOHO.CRM.API.delinkRelatedRecord(config)

Here config is the configuration object constructed with the following details:

Configuration Object

Name
Type
Description
Entity
String
API Name of the module.
RecordID
String
RecordID of the entity whose associated details are required.
RelatedListName
String
API Name of the relatedList of the entity.
RelatedRecordID
String
Related Record ID.

Example

ZOHO.CRM.API.delinkRelatedRecord({Entity:"Contacts",RecordID:"43426879776433",RelatedList:"Deals",RelatedRecordID:"7678567456858"})
.then(function(data){
console.log(data)
})


Here, the Deal (related list for the Contact module) with deal ID "7678567456858" is associated with the Contact with the recordID "43426879776433". In the above example, the deal's record is delinked from the deals associated with the contact using ZOHO.CRM.API.delinkRelatedRecord.

Scenario:

Let's consider a scenario. Your wireless fidelity business, which is a service provider for wireless network connection, uses Zoho CRM. The Contacts module holds business clients who have bought your connection and the Deals module holds deals (connection plan) that are associated with the client along with the deal status.

Let's imagine a situation in which a customer chooses to unsubscribe from their current plan and move to another plan or move to another service provider. Now you decide to delink the related information from the relevant record in the Contacts module without completely deleting the information from your CRM. You can perform this action by delinking the specific deal associated with the contact. Let's see how ZOHO.CRM.API.delinkRelatedRecord helps to achieve this from a widget.

Code Snippet:

Util={};
function initializeWidget()
{
// Event Listener triggered when the entity page is loaded
ZOHO.embeddedApp.on("PageLoad",function(data)
{
//Fetching the entity ID of the current page that is loaded
contactid=data.EntityId;
entityname=data.Entity;  

/*Fetching all the deals that are related with the contact using the getRelatedRecords method. Passing the value of RelatedList as Deals and Entity as Contacts to the getRealtedRecords method.*/  
ZOHO.CRM.API.getRelatedRecords({Entity:"Contacts",RecordID:contactid,RelatedList:"Deals",page:1,per_page:200})
.then(function(data){
temp=data;
rec=data.data;
console.log(data);
$('#dealidlist').empty();
//Looping through the deals
for (i = 0; i < rec.length; i++) 
{
/*Creating a list called dealidlist. Populating the dealidlist with the names of all the deals associated with the contact, when the GetDeals button is clicked*/
dealid=rec[i].id;
dealname=rec[i].Deal_Name;
var dealidlist = document.getElementById("dealidlist");
var option = document.createElement("OPTION");
option.innerHTML = dealname;
option.value = dealid;
dealidlist.appendChild(option);
}
})
//Functionality of Delink deals button
Util.delink=function()
{
/*The deal selected from the dealidlist is passed as RelatedRecordID value, to the delinkRelatedRecord method. Delinking the deal selected from the dealidlist and thereby dissociating it from the contact*/ ZOHO.CRM.API.delinkRelatedRecord({Entity:"Contacts",RecordID:contactid,RelatedList:"Deals",RelatedRecordID:document.getElementById("dealidlist").value})
.then(function(data){
console.log(data)
})
ZOHO.CRM.UI.Popup.close()
.then(function(data){
console.log(data)
})
}; 
//Functionality of the cancel button
Util.cancel=function()
{
//closes the widget window
ZOHO.CRM.UI.Popup.close()
.then(function(data){
console.log(data)
})
};
})
//Initializing the widget
ZOHO.embeddedApp.init();
}

Click the Manage Connections button (available in the contact's detail page) associated with the widget to open the widget screen.



Choose the deal you want to delink from the contact and click Delink Deal. The deal will now be delinked from the customer.



This is an example of how you can use ZOHO.CRM.API.delinkRelatedRecord to delink a related record from a Zoho CRM contact from your widget. You can use this SDK according to your business needs to perform operations efficiently from your widget. We hope you found this information useful. Keep following this space for more tips.

SEE ALSO



    Access your files securely from anywhere









                          Zoho Developer Community




                                                • Desk Community Learning Series


                                                • Digest


                                                • Functions


                                                • Meetups


                                                • Kbase


                                                • Resources


                                                • Glossary


                                                • Desk Marketplace


                                                • MVP Corner


                                                • Word of the Day


                                                • Ask the Experts





                                                          Manage your brands on social media



                                                                Zoho TeamInbox Resources



                                                                    Zoho CRM Plus Resources

                                                                      Zoho Books Resources


                                                                        Zoho Subscriptions Resources

                                                                          Zoho Projects Resources


                                                                            Zoho Sprints Resources


                                                                              Qntrl Resources


                                                                                Zoho Creator Resources



                                                                                    Zoho CRM Resources

                                                                                    • CRM Community Learning Series

                                                                                      CRM Community Learning Series


                                                                                    • Kaizen

                                                                                      Kaizen

                                                                                    • Functions

                                                                                      Functions

                                                                                    • Meetups

                                                                                      Meetups

                                                                                    • Kbase

                                                                                      Kbase

                                                                                    • Resources

                                                                                      Resources

                                                                                    • Digest

                                                                                      Digest

                                                                                    • CRM Marketplace

                                                                                      CRM Marketplace

                                                                                    • MVP Corner

                                                                                      MVP Corner







                                                                                        Design. Discuss. Deliver.

                                                                                        Create visually engaging stories with Zoho Show.

                                                                                        Get Started Now


                                                                                          Zoho Show Resources

                                                                                            Zoho Writer

                                                                                            Get Started. Write Away!

                                                                                            Writer is a powerful online word processor, designed for collaborative work.

                                                                                              Zoho CRM コンテンツ






                                                                                                Nederlandse Hulpbronnen


                                                                                                    ご検討中の方




                                                                                                          • Recent Topics

                                                                                                          • How to copy value from a single line field into a picklist field within a module's subform?

                                                                                                            Hello there, I have a single line field in a module's subform. I would like the value in the field to automatically update a picklist field within the same subform (both have items with the same names). Is this possible via function? Unfortunately, workflows
                                                                                                          • Implementing a Self-Invoicing/Vendor Portal in Zoho Creator

                                                                                                            Hello Zoho Community / Creator Experts, We would like to build a Self-Invoicing Portal (Vendor Portal) in Zoho Creator for our external contractors. Our goal is to allow approved contractors to log in, submit their invoice details (hours worked, project
                                                                                                          • Link to images

                                                                                                            I have added images in pages. I would like to link those images with linked in URL so that they open in new window. There is an option of image -> link but I am not able to use the same to open URL in new window. Please check the attached image. Can you
                                                                                                          • ENTER key triggering Submit

                                                                                                            Is it possible to stopped the ENTER key from the mandatory triggering of the Submit button on Creator form? I want forms submitted "ONLY" when the Submit button is pressed. 
                                                                                                          • Categorise Attachments

                                                                                                            We take ID, proof of address, right to work documentation and more.  I can upload a single file in to field, but we often receive multiple files for each category e.g. someone may send a separate file for the front and back of their national ID card.  My team don't have time to manipulate the files in order to upload them as a single file. The options, as far as I can tell, would be to create additional fields on attachments in order to categorise what the file is, or to be able to upload single
                                                                                                          • Canvas View - Print

                                                                                                            What is the best way to accomplish a print to PDF of the canvas view?
                                                                                                          • Blocked Email

                                                                                                            We are a Zoho One subscriber and use Yahoo as our MX provider. A few times each year, for the past four years, CRM blocks one or more of my Zoho One users from receiving internal email from CRM. This includes "@mentions" in all modules, and emails from
                                                                                                          • Able to change project on timelog entries

                                                                                                            Ability to move the timesheet entry from one project to another. When a user adds a wrong entry a manager can change/update the timesheet entry to the correct project.
                                                                                                          • What formula to use in computing total hrs and decimal hrss

                                                                                                            So , my data includes log im column , 2 breaks with 2 columns that says back and lunch and 1 column that says back and logged out. What formula should i use to be able to automatically have my total hours as I input time in each column? Thankyou
                                                                                                          • i cannot use <b></b> to bold the message in Creator C6!!!!???What?

                                                                                                            Dear experts and friends, Now Creator 6 blocking us from using <b></b> Anyone facing this issue? I faced it on Creator C6 Previously, it used to work. Now failed to work. Faint~ Seek guidance from everyone on how to bold the message. The super simple
                                                                                                          • Knowledge base: The nitty-gritty of SEO tags

                                                                                                            A well-optimized knowledge base with great SEO can benefit your company by allowing customers to find help articles and support resources using search engines. This enables customers to quickly and efficiently find the information they need without direct
                                                                                                          • Billing Preferences per Account

                                                                                                            Hello, We are trying to setup Billing Preferences in Zoho Desk to set up a different pricing per account. We charge different pricing per hour per customer/account. Account A = 100 per hour Account B = 125 per hour In the Billing Preferences in Time Entry
                                                                                                          • Content Security Policy

                                                                                                            Is there a place in ZOHO CRM to add a Content Security Policy to allow for a call to a google.com map, from inside our current app? Or, how do I resolve the issue below?? jquery.js:1 Refused to load the script 'https://maps.google.com/maps/api/js?v=3.41&libraries=places&sensor=true&key=AIzaSyAyQzKeKSbLci4LwZhn9oXvtCkbUo1Ae4g&callback=map_loader'
                                                                                                          • Option to select location?

                                                                                                            As a business coach, I meet with clients at various public locations. I have two or three pre-determined locations that I meet at. I would like the client to choose the location when booking an appointment. Is there a way to do that with a single service, or is the best way to accomplish this by creating one service for each location offered?
                                                                                                          • Time entry preview for custom time entry templates.

                                                                                                            Our company needed time entries in a specific format to document our client interactions. Since we are using a custom time entry layout, we have lost the "preview" on the time entry tab. Using the default time entry layout, you get a small preview of
                                                                                                          • Retainer invoice in Zoho Finance modlue

                                                                                                            Hello, Is there a way of creating retainer invoices in the Zoho Finance module? If not can I request this is considered for future updates please.
                                                                                                          • Unified WhatsApp Number Management in Zoho Desk and SalesIQ

                                                                                                            Dear Zoho Desk Support Team, We are currently utilizing both Zoho Desk and Zoho SalesIQ for our customer support operations. While both platforms offer WhatsApp integration, we are facing challenges due to the requirement of separate WhatsApp numbers
                                                                                                          • Provide a standard structure to your content using article templates

                                                                                                            Hello everyone, When multiple writers work on different documents, maintaining a standard structure can be challenging as each of the writer follows a different writing style. However, when the structure, tone, and format of every document is different,
                                                                                                          • How to update custom multi-user field in Zoho Projects?

                                                                                                            I'm trying to update custom multi-user fields in Zoho Projects via a Deluge function in CRM. The code I have so far is below. It works for updating standard project fields and single-line custom fields, but it does not work to update multi-user fields.
                                                                                                          • Accessibility Spotlight Series - 1

                                                                                                            Every user interacts with products differently, what feels intuitive to one may be challenging for another. Addressing this, accessibility is built into Zoho Project's design philosophy. This helps users navigate and perform actions with ease irrespective
                                                                                                          • Projects Tasks Not Showing Dependencies

                                                                                                            I'm clicking on tasks and the popup to add dependencies isn't showing. I can't disconnect the nodes either. For some reason when I slide a task backwards it says it cannot go before a predecessor, even though there is not predecessor. Double clicking
                                                                                                          • Deprecation of C4 endpoint URLs

                                                                                                            Note: This post is only for users who are still using the C4 endpoints. Hello everyone, At Zoho Creator, we're committed to continuously enhancing the security, performance, and capabilities of our platform. As part of this ongoing effort, we'll be deprecating
                                                                                                          • Introducing AWS authentication for connections in Deluge

                                                                                                            Hello everyone, We're incredibly excited to announce the all-new AWS authentication for connections in Deluge! This highly anticipated feature simplifies connecting to Amazon Web Services, opening up a world of possibilities and allowing you to seamlessly
                                                                                                          • Timeline Tracking Support for records updates via module import and bulk write api

                                                                                                            Note: This update is currently available in Early Access and will soon be rolled out across all data centers (DCs) and for all editions of Zoho CRM. The update will be available to all users within your organization, regardless of their profiles or roles.
                                                                                                          • Paste issues in ZOHO crm notes

                                                                                                            Hi, since a week or so I have issues with the paste function in ZOHO CRM. I use "notes" to copy paste texts from Outlook emails and since a week or so, the pasting doesnt function as it should: some text just disappears and it gives a lot of empty lines/enters.....
                                                                                                          • Bug Report and Suggestions for Improvement in Zoho Applications

                                                                                                            Hi Zoho Team, I’d like to report a few bugs and improvement suggestions I’ve noticed while using Zoho products: Zoho Cliq Video Call: The camera sometimes turns off automatically during video calls. This seems to be a bug — please check and fix it. Zoho
                                                                                                          • Customize User Invites with Invitation Templates

                                                                                                            Invitation Templates help streamline the invitation process by allowing users to create customized email formats instead of sending a one-size-fits-all email. Different invitation templates can be created for portal users and client users to align with
                                                                                                          • Zoho CRM Workflow and Function Backup Options

                                                                                                            Hi everyone! I have been able to make several backups of my CRM data and noticed that the Workflows and Functions are not included in these backups. To my knowledge, there is no backup feature for workflows and functions, which is problematic in of itself.
                                                                                                          • ListObjects is recognized by VBA

                                                                                                            Sub addNewRow() Dim ws As Worksheet ' Set your worksheet name Set ws = ThisWorkbook.Sheets("Invoice") ' Set your table name (change "Table1" to your actual table name) ws.ListObjects("InvItems").ListRows.Add End Sub I am getting Unknown function: Li
                                                                                                          • KPI Widget dashboard select periods

                                                                                                            I have a problem with selecting periods as a user filter. In the beste scenario I would like to have to have a period filter like Google Analytics has of Datastudio (see attachment). In the KPI widget I "Group by "inquiry_date" on week&Year". It selects
                                                                                                          • Need a way to secure Prefill URLs in Zoho Forms (hide or encrypt prefilled values)

                                                                                                            Hi everyone, I often use Zoho Forms with prefilled URLs to simplify the user experience — for example: https://forms.zohopublic.com/.../form?Name=David&Amount=300 However, the problem is that all prefilled values are visible and editable in the link.
                                                                                                          • Can’t send emails from Zoho CRM after adding a new user — verification codes not received

                                                                                                            Hi everyone, We recently added a new user to our Zoho CRM account and purchased an additional license. Since then, we haven’t been able to send any emails from Zoho CRM. Our Zoho Mail accounts are working perfectly, we can send and receive emails directly
                                                                                                          • Can I add Conditional merge tags on my Templates?

                                                                                                            Hi I was wondering if I can use Conditional Mail Merge tags inside my Email templates/Quotes etc within the CRM? In spanish and in our business we use gender and academic degree salutations , ie: Dr., Dra., Sr., Srta., so the beginning of an email / letter
                                                                                                          • CRM for email in Outlook: how to ignore addresses?

                                                                                                            We’re using the "Zoho CRM for email" add-in for Outlook. When opening an email, the add-in displays all email addresses from the message and allows me to add them to the CRM or shows if they’re already contacts. However, sometimes people listed in To
                                                                                                          • Scheduling Calls in CommandCenter / Blueprints

                                                                                                            I would love it if you could add a function to schedule a call in the lead's record for a future date. I know you can add a Task by going to Instant Actions > Task and completing the form: These tasks go into the lead's record under Open Actions. But
                                                                                                          • Workflow Creation with Zia gets stuck

                                                                                                            It gets stuck here:
                                                                                                          • Quickly send emails and sync conversations with custom email addresses in CRM

                                                                                                            Editions: All editions DCs: All DCs Release plan: This enhancement has been released for customers in all DCs except IN and US. We will be enabling it for IN and US DC customers soon. [Update on 22 May 2024] This enhancement has been released for all
                                                                                                          • Zoho製品と生成AIツールの活用について

                                                                                                            いつもありがとうございます。 弊社では、Zoho Oneを契約し、CRMを軸として、見込み客の管理から商談、その後の受注や請求の管理、サポート業務(Desk)、業務データのレポーティング(Analytics)などを行っております。 Zohoサービス自体には、Ziaというツールが搭載されているかと存じますが、それ以外の外部の生成AIツールと連携した活用などもできるのでしょうか?具体的には、CopilotなどがZohoに登録されているデータや情報を見て、対話型で必要なデータを提示してくれたり、商談や蓄積されたメモなどを分析してユーザが知見を得られるような活用ができないか、と考えております。
                                                                                                          • File Field Validation

                                                                                                            Hello all, We are tracking our customer NDA agreements in our CRM and have created 2 fields to do so, an execution date field and a file upload field. I want to create a validation rule to ensure that when the execution date field is populated that the
                                                                                                          • Work with Contacts who use multiple Emails / Manage obsolete Email addresses without loosing Emails in Context

                                                                                                            Hello List Work with Contacts who use multiple Emails Only after 1 week in using Zoho CRM productively we have contacts which randomly use 2 different email addresses. From the concept I've understood that Zoho CRM offers two email fields which are recognized
                                                                                                          • Next Page