Tag Archives: custom

Salesforce: use Apex Code to grant permissions to custom object and fields

List<Id> profilePermissionsSetIds = [ select id, Profile.UserLicense.Name from PermissionSet where IsOwnedByProfile = true and Profile.UserLicense.Name = ‘Salesforce’]; List<ObjectPermissions> objPermissions = new List<ObjectPermissions>(); for ( String pId: profilePermissionsSetIds ) { objPermissions.add( new ObjectPermissions ( SObjectType = ‘Custom_Object__c’, ParentId = pId, PermissionsRead … Continue reading

Posted in Administration, apex, Profile, salesforce, Uncategorized | Tagged , , , , , , , , , | Leave a comment

The simplest way to get custom field id dynamically in Lightning

I have a lightning component where I need to display link to related list of children relationship record for given custom object record. Since I developed this application on sandbox, I can’t hardcode this link since it will change after … Continue reading

Posted in custom, field, salesforce, Uncategorized | Tagged , , , , , | Leave a comment

Salesforce: how to check if profile is custom or standard by code

When I needed to grant access to some object to all profiles I understood how is it possible to  profile is custom or standard by code   public static Boolean isStandardProfile( String profileName ) { List<PermissionSet> ps = [ select id … Continue reading

Posted in Profile, salesforce, User Management | Tagged , , , , | Leave a comment

Salesforce Delegator to Run Batch

I was asked to implement a button to run a batch. Firstly I decided to create a VisualForce page with a simple controller like this I presented this solution to the client, but the client told me that he would … Continue reading

Posted in apex, batch, button, controller, custom, javascript, Posts in English, Run, salesforce | Tagged , , , , , , , , , , , | Leave a comment

Manual Share of records through SOAP Webservices: Partner WSDL or Enterprise WSDL or Custom Code

Recently I was writing about solution to bug in new FF managed package which breaks S2S connection which required change in account trigger logic to automatically share that account or those accounts being updated to partner organization. Now I would … Continue reading

Posted in apex, S2S, SOAP, Webservices, WSDL | Tagged , , , , , , | 1 Comment

Salesforce controllers. Reminder before certifications.

Controllers can be: standard <apex:page standardController=”MyCustomObject__c”> </apex:page> custom <apex:page controller=”myController” extension <apex:page standardController=”Account” extensions=”myControllerExtension”> ___

Posted in certification, controller, Posts in English, salesforce | Tagged , , , , , | Leave a comment