Authorkalpesh.surana

Lightning Pages vs VF Pages

L

Lightning is available in GA from this release .You can ofcourse approach via lightning .Some of the things you need to be extra careful are here 1)No router support in lightning yet and hence its extremely difficult designing navigation at this point .You will end up writing lot of code just to achieve navigations 2)Custom lookups you can get from developerforce blogs 3)Toggling visibility is...

‘Immediate’ attribute for commandbutton and commandlink in VF page

&

This is basically used when we don’t want our validation rules to be fired during any server request. It is a Boolean value that specifies whether the action associated with this component should happen immediately, without processing any validation rules associated with the fields on the page. If set to true, the action happens immediately and validation rules are skipped. If not specified, this...

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