Search code examples
google-chromepopupwindowzohozoho-deluge

How to open up a popup in Zoho CRM


I currently have a Zoho Blueprint for a conversion that sends a request to Stripe to create the customer, create and finalize an invoice and then send me the invoice payment link in Slack.

How could I open a popup in the window so the invoice link shows up right in my face in the browser?

I use Chrome.


Solution

  • I guess you are using Zoho CRM.

    Solutions:

    1. The only way to create something like a popup is to create a button that will display a message with the link you want.
    2. But it is possible to automatically open the link you want when the button is pressed.

    To implement any of those solutions you should have a field in each record you want to use to open/show the link via the button.

    To create & automatically fill this field with Stripe invoice link follow the steps below:

    1. Create a URL field in the module from you want to show the URL (Example: "Stripe Invoice Link").
    2. Create an automation that will fill this field with the returned from Stripe link (when the link is generated in Stripe)
    3. Fill the new field in historical records if you want to open the link from them.

    Then you should create the button that will open/show the link you have stored in the field you created.

    1. Create a button (Example: "Show Stripe Invoice Link") in the module you want to show the URL from.
    2. Add a function to this button.
    3. Add "recordID" parameter with the record ID value to this function.

    The next step depends on what you want.

    If you want to just show the link, copy the code below to this function:

    record = zoho.crm.getRecordById("MODULE_API_NAME", recordId);
    s = record.get("FIELD_API_NAME");
    return s;
    

    If you want to automatically open the link, copy the code below to this function:

    record = zoho.crm.getRecordById("MODULE_API_NAME", recordId);
    openUrl(record.get("FIELD_API_NAME"), "new window");
    return null;