New answers tagged

0 votes

How can I upload/change user's profile image programatically or via API?

ChatterUsers class no longer supports setting photos. Currently this functionality is available under UserProfiles class. ConnectApi.Photo photo = ConnectApi.UserProfiles.setPhoto(communityId, userId, ...
user avatar
0 votes

validation rule on opportunity when stages are 1 or 2, ZAS profile can edit particular fields on opportunity

Your validation rule should be like below. AND( OR(NOT(ISPICKVAL(StageName,'stage1')), NOT(ISPICKVAL(StageName,'stage2')) ), $Profile.Name = 'ZAS profile', OR(ISCHANGED(...
user avatar
2 votes

Apex class access issue with profile : summer 22 release

I am not 100% sure, why it is happening to you only now because in Winter '21 there is release enforcement which has been enforced. Restrict Access to @AuraEnabled Apex Methods for Authenticated Users ...
user avatar
0 votes
Accepted

Behavior when retrieving Translation/Profiles Metadata from a Scratch Org vs. other Org (Sandbox, Production, Developer Edition)

Found the answer in the Salesforce DX Developer Guide Retrieve and Pull Changes to Profiles with Source Tracking: Retrieving and pulling profiles behaves a little differently with source tracking. ......
user avatar
0 votes

How to grant apex class access to profile programmatically

As per Salesforce documentation. ParentId only takes Permission Set Ids. Its better to create a permission set and get that permission set added to user using PermissionSetAssignment
user avatar

Top 50 recent answers are included