Update Portal User Name using Deluge?

Update Portal User Name using Deluge?

Hey everyone.

I have a basic intake form that gathers some general information. Our team then has a consultation with the person. If the person wants to move forward, the team pushes a CRM button that adds the user to a creator portal. That process is a CRM function that calls a webhook that calls a Creator function. The process works except it only creates the email and then sets the name and username based on the email prefix. I was hoping there was a way to pass the contacts name during the creation or we could update the portal user after it's created. Is this possible? Below are my codes.

CRM Function
  1. string button.createCreatorPortalUser(Int accountId)
  2. {
  3. try 
  4. {
  5. // 1. GET THE ACCOUNT RECORD
  6. accountDetails = zoho.crm.getRecordById("Accounts",accountId);
  7. // 2. GET THE PRIMARY CONTACT NAME
  8. primaryContactName = accountDetails.get("Associated_Contacts");
  9. if(primaryContactName != null)
  10. {
  11. // 3. FIND THE CONTACT IN CRM
  12. searchResults = zoho.crm.searchRecords("Contacts","(Full_Name:equals:" + primaryContactName + ")");
  13. if(searchResults.size() > 0)
  14. {
  15. contactDetails = searchResults.get(0);
  16. contactEmail = contactDetails.get("Email");
  17. contactFullName = contactDetails.get("Full_Name");
  18. if(contactEmail == null || contactEmail == "")
  19. {
  20. return "❌ Error: The primary contact '" + contactFullName + "' is missing an email address.";
  21. }
  22. // 4. PREPARE JSON BODY
  23. paramMap = Map();
  24. paramMap.put("fullName",contactFullName);
  25. paramMap.put("email",contactEmail);
  26. paramMap.put("sendInvite","true");
  27. jsonBody = paramMap.toString();
  28. // 5. CALL THE CREATOR CUSTOM API
  29. response = invokeurl
  30. [
  31. url :"https://www.zohoapis.com/creator/custom/jaimefurtado2/Add_Portal_User"
  32. type :POST
  33. parameters:jsonBody
  34. headers:{"Content-Type":"application/json"}
  35. connection:"crm_to_creator"
  36. ];
  37. info "Creator Response: " + response;
  38. // --- Simplified user messages ---
  39. if(response.get("result") != null)
  40. {
  41. statusVal = ifnull(response.get("result").get("status"),"");
  42. msgVal = ifnull(response.get("result").get("message"),"");
  43. if(statusVal == "success")
  44. {
  45. return "✅ Portal user created successfully. " + msgVal;
  46. }
  47. else if(statusVal == "info")
  48. {
  49. return "ℹ️ Portal user already exists. " + msgVal;
  50. }
  51. else
  52. {
  53. return "⚠️ Portal user operation completed, but with warnings: " + msgVal;
  54. }
  55. }
  56. else
  57. {
  58. return "⚠️ Unexpected Creator response. Please check logs.";
  59. }
  60. }
  61. else
  62. {
  63. return "❌ Error: The primary contact '" + primaryContactName + "' could not be found in the Contacts module.";
  64. }
  65. }
  66. else
  67. {
  68. return "❌ Error: The 'Associated_Contacts' field is empty on this Account record.";
  69. }
  70. }
  71. catch (e)
  72. {
  73. info "Exception: " + e;
  74. return "❌ An unexpected system error occurred: " + e;
  75. }
  76. }

Creator Function
  1. map addPortalUser(string fullName, string email, string sendInvite)
  2. {
  3. try 
  4. {
  5. // --- Validate inputs ---
  6. if(email == null || email.trim() == "")
  7. {
  8. return {"status":"error","message":"Email is missing or invalid"};
  9. }
  10. if(fullName == null || fullName.trim() == "")
  11. {
  12. return {"status":"error","message":"Full name is missing or invalid"};
  13. }
  14. // --- Assign to a real profile in THIS portal (case-sensitive) ---
  15. profileName = "Customer";
  16. // <-- change if your portal uses a different name
  17. resp = thisapp.portal.assignUserInProfile(email,profileName);
  18. info "AssignUser RAW Response: " + resp;
  19. // New user path
  20. if(resp != null && resp.containKey("status") && resp.get("status") == "success")
  21. {
  22. return {"status":"success","message":"Portal user added and assigned to: " + profileName};
  23. }
  24. // Already-exists path
  25. else if(resp != null && resp.containKey("emailId"))
  26. {
  27. existingProfile = profileName;
  28. if(resp.containKey("profileName"))
  29. {
  30. existingProfile = resp.get("profileName");
  31. }
  32. return {"status":"info","message":"User already exists. Ensured/retained profile = " + existingProfile};
  33. }
  34. // Anything unexpected
  35. else
  36. {
  37. return {"status":"error","message":"Unexpected Creator response: " + resp};
  38. }
  39. }
  40. catch (e)
  41. {
  42. info "Exception: " + e;
  43. return {"status":"error","message":"An unexpected error occurred: " + e};
  44. }
  45. }

    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 Writer

                                                                                              Get Started. Write Away!

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

                                                                                                Zoho CRM コンテンツ




                                                                                                  Nederlandse Hulpbronnen


                                                                                                      ご検討中の方




                                                                                                            • Recent Topics

                                                                                                            • Messaging

                                                                                                              Whenever i send a mail to someone, it come with the my name of the company, instead of the name of my company.
                                                                                                            • Can't receive emails. MX Records are good apparently.

                                                                                                              Hello, For the past couple of days I have been able to send but unable to receive email through Zoho Webmail. I went into Admin Console and it says: MX Records are configured correctly and Your Domains MX Records are pointed to Zoho. Could you please
                                                                                                            • How can I customize my sales pipeline in Zoho.com CRM ?

                                                                                                              Hi to all intelligent community members I’m Namrata Hinduja Geneva, Switzerland, new member in Zoho.com and in this community. Please resolve my query - How can I customize my sales pipeline in Zoho.com CRM to track the progress of deals more effectively?
                                                                                                            • Error when adding phone number

                                                                                                              Hi Team, I'm getting an error when trying to authenticate using my phone, please see image attached. thanks, Jose
                                                                                                            • Zoho Projects iOS app update: Revamp of toast message and an option to view the whiteboard images

                                                                                                              Hello everyone! In the most recent Zoho Projects app update, we have brought in support for the following features: 1. Toast message revamp: We have enhanced the toast message banners to a bolder interface. You will now be updated on the progress of uploads
                                                                                                            • Send a new invoice data from Books to local certified solution via API json due local compliance

                                                                                                              Greetings, I hope you are doing well and staying safe. Due to local compliance regulations, I am required to issue invoices exclusively using locally certified software, which Zoho Books is not. However, we would like to continue using Zoho Books, so
                                                                                                            • How to Populate the Amount field of a Deal by subform's aggregate data

                                                                                                              https://help.zoho.com/portal/community/topic/custom-function-25-%c2%a0populate-the-amount-field-of-a-deal-by-calculating-the-number-of-related-products-and-its-unit-price I'm trying to do an Deal amount update like this guide but I use a subform to calculate the product amount and price instead. Please help me writing the code. regards
                                                                                                            • Unblocking Outgoing Emails on exports@carelyexport.com – Urgent Assistance Needed

                                                                                                              We are a newly established export-import startup operating under the business name Carely Export, and we are currently using Zoho Mail for our business communications. However, we are experiencing an issue where our outgoing emails are being blocked,
                                                                                                            • Property Management: Creating Amazing Appointment Scheduling Sites

                                                                                                              Sometimes a property management company can be very busy where even some time and effort saved can make a difference in a world. If you are a property manager, would you not like it if you could spend the wasted time managing appointments to get your job done? This is where getting a booking appointment platform lets you improve efficiency and save time. The enticing scheduling appointment platform can also help get more clients in than normal. It will help you contend with other companies that have
                                                                                                            • IP BLACKLISTED UCEPROTECTL3

                                                                                                              Your IP 136.143.188.56 was NOT directly involved in aabuse, but has a bad neighborhood. Other customers within this range did not care about their security and got hacked, started spamming, or were even attacking others, while your provider has possibly
                                                                                                            • Adding Public Holidays to the Calendar

                                                                                                              Hi, How do you add a public holiday to the calendar, we are closed on public holidays but if someone has requested holidays over that time how do we avoid the day being deducted as this is already a paid holiday? 
                                                                                                            • Your inbox called; it wants less clutter

                                                                                                              Inbox full of ghosts? Let Auto-Close do the haunting. Ever stared at your support inbox wondering why half the chats are just… sitting there? No reply, no closure, just hanging like unread messages from a advertising company. Let’s fix that. With Auto-Close,
                                                                                                            • an issue in Zoho CRM where the workflow rule is not triggering

                                                                                                              H I’m currently facing an issue in Zoho CRM where the workflow rule is not triggering when a new lead is created through a webform. I’ve double-checked the criteria and field updates, everything seems fine but it still doesn’t fire. Has anyone faced this
                                                                                                            • Feature Request: Mass update selected Contacts to Accounts

                                                                                                              I can't believe this isn't an ability already. It's a quick fix that would save hours of manual entry time. This looks like it had been requested 3-4 years ago with no answers from staff! Please add all contact fields into the "mass update" menu. You
                                                                                                            • How to add the other customer to the list of customers

                                                                                                              So I have a list of customers with the option of other. So when I select other and the new customer, how to get to it be saved to that list in creator.
                                                                                                            • Automate and Personalize Engagement for Campaign Leads Using Zoho SalesIQ Chatbots

                                                                                                              Hi everyone! In our last post, we explored how to identify, qualify, and nurture leads using SalesIQ Triggers and Zoho Campaigns integration. To recap, once visitors meet your criteria, you can add them to a Campaigns mailing list with Triggers. When
                                                                                                            • compensation module - salary - No decimals allowed regardless of currency

                                                                                                              In the United Kingdom we have calculations in GBP which has figures to 2 decimal points. When using either the basic salary or using the CTC with benefits etc. It will block any upload or entry which is not a round number! I have advised Zoho One and
                                                                                                            • Unable to add estimate field to estimate template

                                                                                                              I have the field "SKU" as part of my service data. I can also see it as a column when displaying the list of services. However, I have no way to include it on my estimate template because the field is not showing as a column field to include for the service/part
                                                                                                            • Adding Today's Date into an email template

                                                                                                              Is it possible to add today's date into an email template? Any help would be gratefully received.
                                                                                                            • Entry created or updated - not getting all fields

                                                                                                              I have a flow that fires on an entry being created or updated in a custom module in CRM.  It is only supposed to proceed if a particular field is false and once fired, immediately updates that field to true to avoid running multiple times.  For some reason,
                                                                                                            • Help createing Inventory Volume report

                                                                                                              I've been working with Zoho support for a few months now trying to develop a inventory volume report. Though they have been helpful, it never seems to generate exactly what we're looking for. I thought I'd turn to the community for further help. We've
                                                                                                            • Zoho Sprints - Timesheet Rejected

                                                                                                              Does a user get notified is his Timesheet entry has been rejected?
                                                                                                            • Sixth Insight - The Hidden C in Data

                                                                                                              The Wheels of Ticketing - Desk Stories The Hidden C in Data [Importance of clean data] Data cleaning Data cleaning ensures ticketing systems' data is accurate, consistent, and complete. This process includes eliminating duplicates, fixing errors, and
                                                                                                            • Simple Text Search Function

                                                                                                              Would it be too much to ask for a simple text search function? My slide decks are often simply collections of slides of a random over, and I often have to find the slide I need at a moment's notice. A text search function, no matter how rudimentary, would
                                                                                                            • KPI Widget would not load columns

                                                                                                              My Zoho Analytics would not load columns on KPI Widgets, is there anyone who could help me on this?
                                                                                                            • Introducing the calendar view for Bigin's Activities module

                                                                                                              Hello everyone, We're excited to announce the calendar view in Bigin. This view presents all tasks, events, and calls in an intuitive and visually appealing interface, and will be set as the Activities module's default landing page, ensuring you have
                                                                                                            • Its 2022, can our customers log into CRM on their mobiles? Zoho Response: Maybe Later

                                                                                                              I am a long time Zoho CRM user. I have just started using the client portal feature. On the plus side I have found it very fast and very easy (for someone used to the CRM config) to set up a subset of module views that make a potentially extremely useful
                                                                                                            • Add documents/uploaded files in Zoho CRM records that can be accessed by all team members?

                                                                                                              Hi, I'm building out our small business' Zoho CRM implementation and are on a Zoho One plan. We do LED Lighting Projects for customers, and collect data like customer utility bill PDFs, and pictures of existing lighting that we want to keep in one centralized
                                                                                                            • Updates for Zoho Campaigns: Merge tag, footer, and autoresponder migration

                                                                                                              Hello everyone, We'd like to inform you of some upcoming changes with regard to Zoho Campaigns. We understand that change can be difficult, but we're dedicated to ensuring a smooth transition while keeping you all informed and engaged throughout the process.
                                                                                                            • Customizing Helpcenter texts

                                                                                                              I’m customizing the Zoho Desk Help Center and I’d like to change the wording of the standard widgets – for example, the text in the “Submit Ticket” banner that appears in the footer, or other built-in widget labels and messages. So far, I haven’t found
                                                                                                            • Zoho Desk - I am no longer receiving email notifications when comments are made on tickets

                                                                                                              I still receive other notifications via email (e.g., new tickets and replies) - however beginning May21, I no longer receive notifications on comments (whether private or public) - I have confirmed that notifications are toggled on for agents within system/notification
                                                                                                            • Issues with Campaign Results Sync Between Zoho Campaigns and Zoho CRM

                                                                                                              Hi everyone, I’m experiencing an issue with the integration between Zoho Campaigns and Zoho CRM. When I send campaigns from Zoho Campaigns, the results shown in Campaigns (such as the number of emails sent, opened, and clicked) do not exactly match the
                                                                                                            • Greek languge

                                                                                                              Hello, Is there any support for Greek language in the near future?
                                                                                                            • Import records with lookup field ids

                                                                                                              Hi Is anyone able to import records into Recruit via spreadsheet / csv which contain ids as the lookup values. When importing from spreadsheet lookups will associate with the related records if using record name, however when using related records id
                                                                                                            • Custom module history is useless

                                                                                                              Hi I am evaluating ZOHO DESK as my support platform. As such I created a few custom modules for devices assigned to employees. I want to be able to see the whole picture when a device was reassigned to someone, but the history shows nothing Is there any
                                                                                                            • Email rejected per DMARC policy

                                                                                                              Hi, We've got the return message from zoho like 'host mx.zoho.com[204.141.33.44] said: 550 5.7.1 Email rejected per DMARC policy for circlecloudco.com in reply to end of DATA command' We're sure our source IP address matches the SPF the sender domain
                                                                                                            • EMail Migration to Google Apps is Too Slow

                                                                                                              We are moving to Google Apps and the email migration is really slow. Anyway you guys check if this is a server issue?
                                                                                                            • How to import subform data - SOLUTION

                                                                                                              To all trying to import subform data, I might have a solution for you. First of all, for this solution to work, the subform data needs to be an independent form (not ad hoc created on the main form). Furthermore, this approach uses Excel sheets - it might not work using CSV/TSV. If this is true, then follow these steps: Import the subform records Then export these records once more including their ID Now prepare an import file for the main form that needs to contain the subform records Within this
                                                                                                            • Help center custom tab - link color

                                                                                                              I’m trying to add a custom tab to the main navigation in the Zoho Desk Help Center, for example to link to an external resource like a website. The problem is that any custom tab I add always shows up as a blue link – it doesn’t match the style of the
                                                                                                            • Organization API: code 403 "Crm_Implied_Api_Access" error for "https://www.zohoapis.com/crm/v2/org"

                                                                                                              Hello. I've developed an add-on that allows clients to synchronize data from Zoho CRM with the Google Spreadsheet. I am using the OAUTH2 protocol, so clients will have to authenticate into their Zoho account, and Zoho will send back to the app an access token which will be used to get data. Currently, there are about 100 clients, and everything works smoothly. Today I've found that a guy who could become a new client was not able to to get his organization data, because the application receiving
                                                                                                            • Next Page