How to find how many profiles have Edit Events permission?
Sample SOQL: SELECT Name, PermissionsEditEvent FROM Profile WHERE PermissionsEditEvent = true Output:
Sample SOQL: SELECT Name, PermissionsEditEvent FROM Profile WHERE PermissionsEditEvent = true Output:
Sample SOQL: SELECT BillingPostalCode FROM Account WHERE BillingPostalCode != NULL AND BillingPostalCode LIKE '___-__' Output:
Sample SOQL: SELECT Name, PermissionsEditTask FROM Profile WHERE PermissionsEditTask = true Output:
Sample Query: SELECT Name, PermissionsViewAllUsers, PermissionsViewEventLogFiles FROM Profile
Sample Code: Set < String > listsObjs = new Set < String > {'Account', 'Lead'}; Map<String, Schema.SObjectType > globalDescription = Schema.getGlobalDescribe(); for ( String obj : listsObjs ) { Schema.sObjectType objType = globalDescription.get( obj ); Schema.DescribeSObjectResult r1 = objType.getDescribe(); Map<String , Schema.SObjectField > mapFieldList = r1.fields.getMap(); for ( Schema.SObjectField field : mapFieldList.values() ) { Schema.DescribeFieldResult fieldResult = field.getDescribe(); String fieldLabel = fieldResult.getLabel().toLowerCase(); Schema.DisplayType fielddataType = fieldResult.getType(); if ( fielddataType == Schema.DisplayType.Email ) { System.debug( objType + '.' + fieldResult.getName() ); } else if ( fieldLabel.contains( 'email' ) && ! fieldResult.isCalculated() ) { System.debug ( objType + '.' + fieldResult.getName() ); } ....
Sample Code: Set < String > listsObjs = new Set < String > {'Account', 'Lead'}; Map<String, Schema.SObjectType > globalDescription = Schema.getGlobalDescribe(); for ( String obj : listsObjs ) { Schema.sObjectType objType = globalDescription.get( obj ); Schema.DescribeSObjectResult r1 = objType.getDescribe(); Map<String , Schema.SObjectField > mapFieldList = r1.fields.getMap(); for ( Schema.SObjectField field : mapFieldList.values() ) { Schema.DescribeFieldResult fieldResult = field.getDescribe(); String fieldLabel = fieldResult.getLabel().toLowerCase(); Schema.DisplayType fielddataType = fieldResult.getType(); if ( ( fieldLabel.contains( 'first name' ) || fieldLabel.contains( 'last name' ) || fieldLabel.contains( 'firstname' ) || fieldLabel.contains( 'lastname' ) ) && ! fieldResult.isCalculated() ) { System.debug ( objType + '.' + fieldResult.getName() ); } } } In the ....
1. Execute the below code in Developer Console. for ( Profile objProfile : [ SELECT Name, ( SELECT Id, IsActive FROM Users ) FROM Profile ORDER BY Name ] ) ....
Sample Code: Component: <aura:component implements="lightning:recordHomeTemplate"> <aura:attribute name = "left" type = "Aura.Component[]" /> <aura:attribute name = "middle" type = "Aura.Component[]" /> <aura:attribute name = "right" type = "Aura.Component[]" /> <div> <lightning:layout > <lightning:layoutItem size = "2"> {!v.left} </lightning:layoutItem> <lightning:layoutItem size = "5"> {!v.middle} </lightning:layoutItem> <lightning:layoutItem size = "5"> {!v.right} </lightning:layoutItem> ....
1. Go to the object page layout. 2. Click Edit button. 3. Go to Custom Console Components. 4. Adjust the width. Output:
Password Expiration Date is available on the standard Users report type to find the Password Expiration Date for users in Salesforce. So, using the standard Users report type, we can ....