Find Field Access and Object Access to User or User Profile and Query Lightning Flexipage

Know Aparticular user have acces on Field

Select SObjectType, Field, Parent.name, PermissionsRead, PermissionsEdit from FieldPermissions where       SObjectType = 'Account' and Field in ('Account.Phone')

Know Aparticular user have acces on Object

SELECT Id,SObjectType ,PermissionsRead, PermissionsCreate, PermissionsEdit, PermissionsDelete, Parent.Profile.Name FROM ObjectPermissions WHERE SObjectType = 'Account' AND Parent.Profile.Name = 'System Administrator'

Know Aparticular user have acces

SELECT RecordId, MaxAccessLevel, HasAllAccess, HasDeleteAccess, HasEditAccess, HasReadAccess, HasTransferAccess FROM UserRecordAccess WHERE UserId = '005Bm00000EYrt3' AND RecordId = '069OZ00000637zBYAQ'


Retrive : Lighting Record Pages

SELECT Id, DeveloperName, MasterLabel, LastModifiedDate, Type, EntityDefinitionId FROM FlexiPage WHERE Type= 'RecordPage' AND EntityDefinitionId= 'Case' Order By LastModifiedDate DESC

Note : Enable   Tooling API?

Retrive : Lighting Page layouts

SELECT Id, Name, EntityDefinitionId, EntityDefinition.QualifiedApiName FROM Layout Where EntityDefinition.QualifiedApiName = 'Case'

Note : Enable   Tooling API?

Query Organization-Wide Defaults

Select Id,DeveloperName,KeyPrefix,QualifiedApiName,ExternalSharingModel,InternalSharingModel,IsWorkflowEnabled,IsProcessEnabled From EntityDefinition Order By DeveloperName

String cronExp = '0 20 11 * * ?'; // Runs every day at 11:20 AM

System.schedule('LeadOneToolJob1', cronExp, new LeadOneToolScheduler());

Comments

Popular posts from this blog

My Trigger Scenario's

Configure types Of Products in CPQ and Revenue Cloud ?

Steps for Calculate Derived Pricing in RCA ?