You need to sign in to do that
Don't have an account?
SalesRed
System.InvalidParameterValueException: Invalid SetupOwner for Custom Settings
Hi, I have a hierarchial custom setting of which I create an instance of in a test class. I receive an error though when I execute my test class. The error being.
"System.InvalidParameterValueException: Invalid SetupOwner for Custom Settings"
In accessing the custom setting in my Apex class I use the following.
Brokerage__c brokerage = Broker__c.getInstance(UserInfo.getOrganizationName());"
The functionality does execute ok however the failute occurs as mentioned in my test class. Does anyone know I can get around this. I would have thought the user running the test would exist within the same organisation so it should work.
Any tips or help on this would be appreciated.
Thanks in advance.
"System.InvalidParameterValueException: Invalid SetupOwner for Custom Settings"
In accessing the custom setting in my Apex class I use the following.
Brokerage__c brokerage = Broker__c.getInstance(UserInfo.getOrganizationName());"
The functionality does execute ok however the failute occurs as mentioned in my test class. Does anyone know I can get around this. I would have thought the user running the test would exist within the same organisation so it should work.
Any tips or help on this would be appreciated.
Thanks in advance.
When I changed this it works ok.
Thank you all the same for your help. It's good to know it's resolved.
All Answers
Thanks.
When I changed this it works ok.
Thank you all the same for your help. It's good to know it's resolved.