0

I have been working on a project where it will display 9 of the most recent "Signed" or "Rev Rec'd" Opportunities. It completely working correctly for me, but for some reason its not populating for other Salesforce users.

What my Map view looks like:

enter image description here

Question:

What would be the issue?

Could it a internet connection issue, because I'm a admin, or something to do with how I query the data via Apex?

1 Answer 1

1

Could it a internet connection issue, because I'm a admin, or something to do with how I query the data via Apex?

No, technically probably yes, and no.


First, check the other users' profile(s), and make sure you have added your Apex class to their security settings. Users with Author Apex (e.g. admins) aren't concerned with this setting, as they can always run code, but normal users need to have this access granted. Go to Setup | Users | Profiles | Profile Name | Apex Class Access | Edit, then add in your class. This is the most likely cause.

If that does not resolve the issue, log in as a user of that profile and try running an Opportunity report. If they can't see any opportunities, you need to alter your sharing settings. Go to Setup | Security | Sharing Settings, and either add Sharing Rules or changing the default Organization Wide Defaults sharing model.

Also, if you intend for each user to see their own data, you'll need to change the Apex code to filter by OwnerId.

2
  • Thank you, the first part solved my problem.
    – Pinto
    Commented May 3, 2023 at 15:30
  • 1
    @Pinto No problem, always happy to help.
    – sfdcfox
    Commented May 3, 2023 at 15:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .