You need to sign in to do that
Don't have an account?
Tejender Mohan 9
How can we use a variable as “string[] fullNames” on readMetadata?
Hello Everyone,
Below given is the syntax for readMetadata call for fetching WorkflowRule specific to an object .
Below is the code snippet from my code,
while I am trying to execute it , it gives NULL for mdInfoWorkflow.fullname
Note: Cobj is a FileProperties type list of all object
Please suggest.
Thanks in Advance :)
Below given is the syntax for readMetadata call for fetching WorkflowRule specific to an object .
ReadResult = metadataConnection.readMetadata(string WorkflowRule, string[] fullNames);I want to know that Is there any way to use a variable(which has the object name) in place of "string[] fullNames" ?
Below is the code snippet from my code,
while I am trying to execute it , it gives NULL for mdInfoWorkflow.fullname
Note: Cobj is a FileProperties type list of all object
.... for (MetadataService.FileProperties n : Cobj) { readResultWorkflow = service.readMetadata('WorkflowRule', new String[] {n.fullname}); mdInfoWorkflow = readResultWorkflow.getRecords(); system.debug('mdInfoWorkflow :' +mdInfoWorkflow); ...
Please suggest.
Thanks in Advance :)
You can use any list of strings you want.
These two syntaxes are identical: You can also instantiate them with elements inline:
Please mark this as solved if the information helps so that it results in helping others who are encountering a similar issue.
Best Regards,
Nagendra.