Deluge function fails to update lead location in mobile sales app after recent permission changes

We’re running into a frustrating issue with our mobile sales app in Zoho CRM 2021. I created a Deluge function to automatically update the lead location field based on GPS coordinates captured during field visits. The function works perfectly when testing in the web interface, but throws a ‘Permission Denied’ error when our mobile sales reps try to use it.

Here’s the error we’re seeing:


Error: Permission Denied - Unable to update field 'Lead_Location'
Function: updateLeadLocation
Module: Leads

I’ve verified the mobile profile has edit access to the Leads module, and the field-level security seems correct in the web version. The Deluge function is simple - it just takes latitude/longitude and updates a custom location field. Has anyone dealt with permission issues specific to mobile profiles when using Deluge functions? Our sales team relies heavily on mobile updates and this is blocking their workflow.

Before changing the execution context, verify the field-level security matrix. Go to Setup > Security Control > Field Level Security, select the Leads module, and check the ‘Lead_Location’ field permissions for your mobile sales profile. Even if the field is in the mobile layout, FLS can override it. Make sure both ‘View’ and ‘Edit’ are checked for that profile. This is a common gotcha with custom fields accessed through Deluge on mobile.

Good catch on the mobile layout. I checked and the field was missing from the mobile view entirely, even though it showed in web. Added it to the mobile layout but still getting the error. The function is set to ‘Execute as Current User’ - should I change this to run as the function owner instead?

I’ve seen this before. Mobile profiles have separate permission layers that aren’t always synced with web permissions. Check if the custom field ‘Lead_Location’ is actually visible and editable in the mobile layout configuration. Go to Setup > Customization > Modules > Leads > Mobile Layout and verify the field appears there with edit permissions enabled.

I’d also recommend adding error handling to your Deluge function to get more detailed permission info. Wrap your update statement in a try-catch and log the exact permission failure. Sometimes the error message is generic but the actual issue is a related field dependency or a workflow rule that mobile profiles can’t trigger.