You need to sign in to do that
Don't have an account?
ALEX YAN 7
add new values to picklist when use metadata api
Hello,I want to add new values to picklist ,I import all class which from https://github.com/financialforcedev/apex-mdapi into my org.
I write a class named AddSegment.cls and a test class ,when I run test class to create Field ,it show error:Attempt to de-reference a null object, can someone tell me what wrong and what should I do.Thank you very much.
I write a class named AddSegment.cls and a test class ,when I run test class to create Field ,it show error:Attempt to de-reference a null object, can someone tell me what wrong and what should I do.Thank you very much.
I don't know what is your code returning? Need to check your whole code then only I can tell you why is it returning null.
Thanks,
Sukanya Banekar
All Answers
List<MetadataService.SaveResult> results = service.createMetadata( new MetadataService.Metadata[] { customField });
Write below statement before line no.102
if() Let me know if this works
Thanks,
Sukanya Banekar
But when use metadata api to create customField , results should return something ? But I get results null. Is there anything wrong.
I don't know what is your code returning? Need to check your whole code then only I can tell you why is it returning null.
Thanks,
Sukanya Banekar