We have a scenario where we need to make assignments to fields using the method
Once in a managed package the assignment:
String oldDesc = (String)acc.put('Custom_Field__c', 'some value');
will fail, because the packaged field will have a namespace prefix. So if it's been packaged as
, the correct put() call would be:
String oldDesc = (String)acc.put('mypackage__Custom_Field__c', 'some value');
How can I avoid hard coding a package namespace?