CategorySalesforce.com

Salesforce Macro

S

Available in: Enterprise, Performance, Unlimited, and Developer Editions with a Service Cloud license. The super exciting feature, “Macro” allows agents to use macros, which is series of commands and actions that can be stored and automatically run whenever a task needs to be repeated. So a series of repetitive tasks can now be run automatically, including updating fields (ie. status)...

Apex Flex Queue

A

Batch Apex allows us to serve large number of dataset(upto 50 million). Although it can process over millions of records with Batch Apex but it has some platform limits. There can be only five active or queued jobs. Here “Apex Flex Queue” comes into the picture. In this  Spring ’15 release salesforce introduce new feature called “FlexQueue“. FlexQueue allows us to submit batch...

How to generate dynamic queries in apex for sObjects & fields

H

//return a dynamic Query string that includes all the direct sObject fields and the related Name fields from the parent objects //dependent method of getSobjects //TODO: move this into platform wide sobject utils class as it is not domain specific public static String getBaseQuery(String objName, List<String> customFields) { // get the describe info for the org, object and its fields...

How to get picklist values for fields in apex salesforce

H

//get all picklist option values using the type of sobject and specific picklist field //TODO: move this into platform wide sobject utils class as it is not domain specific public static List<String> getPickListValues(String objectName, String fieldName) { try { List<String> pickListValuesList = new List<String>(); sObject sObj = Schema.getGlobalDescribe().get(objectName)...

How to read & check permissions of profiles in apex salesforce

H

public with sharing class IPA_MyAppsComponentController { //Member Var public list myApps {get; private set;} private static ID userId; private static ID profileId; private List myPermSetAsgmnts = new List(); private List profilePermSetAsgmnt = new List(); private Set permSetIds = new Set(); private List appList = new List(); private Set appIds = new Set(); public IPA_Page_Widget__c pageWidgetObj...

How to get your Salesforce Apps List in Apex

H

// To get list of apps assigned to logged in user public with sharing class IPA_MyAppsComponentController { //Member Var public list<AppMenuItem> myApps {get; private set;} private static ID userId; private static ID profileId; private List<PermissionSetAssignment> myPermSetAsgmnts = new List<PermissionSetAssignment>(); private List<PermissionSet> profilePermSetAsgmnt =...

How to add/remove member to Chatter Group in Apex Salesforce

H

public pagereference addMembersInGroup() { public Map<String,String> options = new Map<String,String>(); public Map<String,Id> groupsNmembers = new Map<String,Id>(); try{ ConnectApi.ChatterGroupPage groupPage = ConnectApi.ChatterGroups.getGroups(communityId); for (ConnectApi.ChatterGroupDetail grp : groupPage.groups) { options.put(grp.Name,String.valueOf(grp.myRole));...

Category