4

I'm trying to use the MetadataService.cls provided by FinancialForce.com to create Workflows. The problem I am having is that the declaration for the "workFlow" class and its related components does not Extend the Metadata class.

Without inheriting from that base, some required fields are missing from the object, like "fullName", and the workFlow objects that I create generate 'incompatible type' errors when I use them as parameters in the service.create call.

I'm starting to markup the relevant declarations in the MetadataService.cls, but I'm wondering if there is a reason that they were created that way (without the Extends notation).

 edit...:  as per here, 

Using Meta data api in apex inheriting from Metadata, might be a necessary manual modification because the "...WSDL to Apex code generator that initially generated the wrap did not do this".

 Also, starting from "workflow" is awkward because there is only one per custom object; a better starting point is "workflowRule".  One major hidden issue is that the "fullName" of the "workflowRule" must have the custom sObject as a prefix, for example, "myCustomObject__c.myWorkflowRule".  

Thanks

0

You must log in to answer this question.

Browse other questions tagged .