You need to sign in to do that
Don't have an account?
Kumbresh K
Not able to read CustomObjectTranslation using namespace
Hello all,
I’m not able to readMetadata() CustomObjectTranslation using namespace, it doesn’t return anything (gives null). I have no problem with standard objects or unmanaged custom objects.
Also, I’m using the same fullname that appears when using the listMetadata() method. I’ve tried with and without namespace prefix and still got nothing. Is this a known limitation? Or maybe I’m doing something wrong?
Example
This works fine in unmanaged package
MetadataService.CustomObjectTranslation customObjectTranslation = (MetadataService.CustomObjectTranslation)
service.readMetadata(‘CustomObjectTranslation’, new String[] {‘myCustomobject__c-en_GB’}).getRecords()[0];
This is not working in managed or in my scratch org
MetadataService.CustomObjectTranslation customObjectTranslation = (MetadataService.CustomObjectTranslation)
service.readMetadata(‘CustomObjectTranslation’, new String[] {‘prefiex__myCustomobject__c__c-en_GB’}).getRecords()[0];
Can anyone help me with this?
Thanks,
Kumbresh
I’m not able to readMetadata() CustomObjectTranslation using namespace, it doesn’t return anything (gives null). I have no problem with standard objects or unmanaged custom objects.
Also, I’m using the same fullname that appears when using the listMetadata() method. I’ve tried with and without namespace prefix and still got nothing. Is this a known limitation? Or maybe I’m doing something wrong?
Example
This works fine in unmanaged package
MetadataService.CustomObjectTranslation customObjectTranslation = (MetadataService.CustomObjectTranslation)
service.readMetadata(‘CustomObjectTranslation’, new String[] {‘myCustomobject__c-en_GB’}).getRecords()[0];
This is not working in managed or in my scratch org
MetadataService.CustomObjectTranslation customObjectTranslation = (MetadataService.CustomObjectTranslation)
service.readMetadata(‘CustomObjectTranslation’, new String[] {‘prefiex__myCustomobject__c__c-en_GB’}).getRecords()[0];
Can anyone help me with this?
Thanks,
Kumbresh