You need to sign in to do that
Don't have an account?
Fabio Scheurel
Use the default value for a list custom setting
Hi there,
I was wondering if the default value that I can specifiy for my fields on a list custom setting is usable for some kind of fallback. I would like to retrieve the default value if the stored value for a data set is NULL or a data set does not exist.
I know that I can retrieve the default formula with this call:
Any idea?
I was wondering if the default value that I can specifiy for my fields on a list custom setting is usable for some kind of fallback. I would like to retrieve the default value if the stored value for a data set is NULL or a data set does not exist.
I know that I can retrieve the default formula with this call:
Labels__c.TextKeepInTouchDescription__c.getDescribe().getDefaultValueFormula()However, it will just return a formula, but I need the evaluated result of that formula. Something like
String default = new Labels__c().TextKeepInTouchDescription__c;just leaves me with a null value.
Any idea?
NOTE: This code has not been tested and may contain typographical or logical errors