Salesforce app: Apex trigger error query on Leads

We are using Lightning Sync to sync our user’s calendars to Salesforce. This creates events in Salesforce. A couple of weeks ago we noticed that certain calendar events stopped syncing. With the help of SF support we traced the problem to a trigger from the Zoom app. The trigger is trying to query the Lead object. I was able to apply a quick fix for some of our users with Salesforce licenses by granting Read access on the Lead object, but we have some user licenses that do not support access to Leads, so this is still broken for them and generating errors in our Salesforce org.

We are not using the Lead object in our Salesforce org at all, so there is nothing for the Zoom app to query there.

Error
zoom_app.ZoomMeetingCreationTrigger : zoom_app.ZoomMeetingCreationTrigger: execution of AfterInsert caused by: System.QueryException: sObject type ‘lead’ is not supported. If you are attempting to use a custom object, be sure to append the ‘__c’ after the entity name.

Which App?
Salesforce Zoom App

How To Reproduce (If applicable)

  1. Install Zoom app for Salesforce
  2. Enable Lightning/Outlook Sync in Salesforce
  3. Notice that the users calendars are missing many events
  4. See trigger errors in the log

Thanks for your consideration!
Sue

Hey @sti1,

Thanks for reporting this. (ZOOM-218234) Our engineering team is taking a look. I will get back to you with updates. :slight_smile:

-Tommy

Thanks @tommy! I appreciate it.

-Sue

Hey @sti1,

Does the Salesforce user you are using have lead access? If not, that could be the issue.

Thanks,
Tommy

Hi @tommy,

Yes that is the issue. As I mentioned above, we have a large subset of users who are under a license type that does not support access to Leads. This didn’t matter until just a couple of weeks ago when the trigger starting generating errors. Salesforce made a change in their last release that looks a lot closer at CRUD permissions when it comes to Apex classes, which I’m guessing is when this started.

I don’t mean to presume but my impression is that there is logic in the trigger that could be offloaded to a trigger handler class. Trigger handler classes can be designated “without sharing” which means they would not be dependent upon the CRUD permissions of the logged in user.

Of course I do not have access to the code so could be completely wrong, but that is my impression of what might be causing the error.

Best,
Sue

Hey @sti1,

Thanks for sharing these details. As this was a Salesforce change I am not sure how much we can do here, but let me see if we can improve the error messaging or flow.

Thanks,
Tommy

Hey @sti1,

Some user licenses do not support access to Leads. Did you mean that the salesforce profile doesn’t have lead read access and when you add that permission, you still can not assign lead access?

If yes, can you try changing the user license?

Thanks,
Tommy

Hey @tommy

The license type we are using is called Lightning Platform Starter, which does not support access to Leads.

We do not have enough regular licenses for all our users and cannot afford to purchase them. (they are a LOT more expensive)

For now I have disabled the Zoom app because we have functionality that relies on the event data. I’m hoping we can work this out - it would be a shame for this to prevent us from using the app when we aren’t even using Leads.

Sue

Hey @sti1,

Thanks for the info. Let me see if there is a solution to the leads blocked.

Thanks,
Tommy

Hey @sti1,

We are going to fix this in one of the upcoming Zoom Salesforce App updates. :slight_smile:

Before we search the lead object ,we are going to add a check to judge whether the user has read access.

Thanks,
tommy

Hey @tommy, oh that’s great news! Thanks!!

Sue

1 Like

You are welcome! :slight_smile:

Thanks,
Tommy

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Hey @sti1 ,

This should be fixed now. Please upgrade to the latest Salesforce Zoom App version and try again. :slight_smile:

Thanks,
Tommy