I am trying to retrieve the list of fields which are mandatory and running below query:
SELECT id, DeveloperName,EntityDefinitionId,IsNillable,Label FROM FieldDefinition where EntityDefinitionId= 'OBJID' LIMIT 200
But results I am getting is incorrect for the Name field. Its mandatory for the object but query showing isNillable = true.
Also returned Id is invalid.
Id DeveloperName EntityDefinitionId IsNillable Label
1 000000000000000AAA Id 01Ib00000011OSj false Record ID
2 000000000000000AAA Owner 01Ib00000011OSj false Owner
3 000000000000000AAA IsDeleted 01Ib00000011OSj false Deleted
4 000000000000000AAA Name 01Ib00000011OSj true Name
5 000000000000000AAA CurrencyIsoCode 01Ib00000011OSj true Currency
6 000000000000000AAA CreatedDate 01Ib00000011OSj false Created Date
7 000000000000000AAA CreatedBy 01Ib00000011OSj false Created By