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, 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.