Answers for "get all field required apex"

0

get all field required apex

for (SObjectField field : SObjectType.MyObject__c.fields.getMap().values())
{
    if (!field.getDescribe().isNillable())
    {
        system.debug(field);
    }
}
Posted by: Guest on August-24-2021

Browse Popular Code Answers by Language