+ Start a Discussion
Santosh Reddy9989Santosh Reddy9989 

how to check the FLS of parent object's field in Child to Parent query ?


query : Select Id, Name, Email, Account.Name, Account.Industry from Contact

For Id, name and Email fields, we use below code for FLS check

 SObjectType childobje = Schema.getGlobalDescribe().get('Contact'); 

if i use childobje.getDescribe().fields.getMap().get('Account.Industry').getDescribe().isAccessible() then i am getting "NullPointerException de-reference a null object" exception.

How to check the FLS for Account.Industry from contact object ??????? 

Santosh Reddy
Raj VakatiRaj Vakati
Juts use like this

Santosh Reddy9989Santosh Reddy9989
Industry is a field of Account.