I try to access the value of a custom setting : this custom setting contains only one field Nombre__c
and the name of the custom setting is Limit__c
.
In apex I try to get the field Nombre__c
:
Limit__c limite = Limit__c.getInstance('limit');
Integer nb = integer.valueOf(limite.Nombre__c);
There is only one value in this custom setting, named "limit" with a value in the field Nombre__c
.
When I run my code I got this error
Attempt to de-reference a null object in the logs.
limite
.