Skip to main content

Hi everyone,

After updating the API versions on our classes to 58, we noticed that our Tasks component is no longer working in external communities. It was functioning fine before the update.

Is there any new security enforcement or restriction introduced in API version 58 that could be affecting this?

Could you please guide me on what I should check to troubleshoot this issue? Any insights would be greatly appreciated!

Thanks in advance.   

2 respuestas
  1. 25 feb 2025, 17:52

    Thanks @Gobinath A

    for your response. 

     

    Here is the detailed information about the issue we are facing: 

     

    We updated our APEX Classes API Version to be the latest since the old V35 is deprecated. Due to this, we had to update the SOQL queries and run them under USER_MODE and with bind variables to avoid cross-scripting and SOQL Injections. So we updated our task controller apex classes and updated the SQL

     

    *FROM:*

    count = Database.countQuery('SELECT COUNT() FROM '+whereClauseOnly)

     

    *TO:*

    count = Database.countQueryWithBinds('SELECT COUNT() FROM '+whereClauseOnly,

    queryParams, System.AccessLevel.USER_MODE);

     

    It helped us pass the code scanner error, compile the code, and launch the patch

     

    However, when the customer logs in, the Task Component keeps loading and never finishes. The Events Components work fine.

     

    What we found out is that if you assign any user Salesforce Admin or Standard User Profile or Standard Community User Profile then it works fine.

     

    But if you assign any custom profile then it doesn’t work. Especially for Community User Profiles.

    We have compared the profiles and nothing pops up as different. So it looks like there may be a system permission or so.

     

    What we are wondering, since now queries are running under a USER_MODE enforced, what additional permissions does Salesforce need to be assigned to the non-admin user profiles to make it work?

0/9000