Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate configuration on save #2

Open
tprouvot opened this issue Aug 9, 2022 · 0 comments
Open

Validate configuration on save #2

tprouvot opened this issue Aug 9, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@tprouvot
Copy link
Owner

tprouvot commented Aug 9, 2022

We have to ensure that the configuration is valid.

For example if we configure a MaskSObjectField to erase Account name field, we must throw an error because this field cannot be empty.

SObject sobj = [SELECT Id FROM Contact LIMIT 1];

Schema.DescribeSObjectResult r = sobj.Id.getSObjectType().getDescribe() ;
Map<String,Schema.SObjectField> fields = r.fields.getMap();

//System.debug(LoggingLevel.INFO, fields);
Schema.DescribeFieldResult dfr = fields.get('email').getDescribe();
System.debug(LoggingLevel.INFO, 'email is nillable ' + dfr.isNillable());
@tprouvot tprouvot added the enhancement New feature or request label Aug 9, 2022
@tprouvot tprouvot self-assigned this Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant