Hi all, i am newbie to AMAPI, to i am trying to create my own class by follow steps below.
- - Generating a valid Apex MetadataService class - Download and edit the WSDL - Change the Port name from 'Metadata' to 'MetadataPort' - Add displayLocationInDecimal to the CustomField definition. <xsd:element name="displayLocationInDecimal" minOccurs="0" type="xsd:boolean"/> - Add gracePeriodDays to the HistoryRetentionPolicy definition. <xsd:element name="gracePeriodDays" type="xsd:int"/> - Locate the CustomMetadataValue complextype, change the type of the 'value' element to 'xsd:string' - Locate the FieldValue complextype, change the type of the 'value' element to 'xsd:string' - Generate Apex from this WSDL - When prompted give it a name of MetadataServiceImported - Verify a MetadataServiceImported class has been created
- - Run the Patch script to generate a new MetadataService class (as a Document) - Check the Release Notes for API changes, locate the Metadata API section and update MetadataServicePatcher.METADATA_TYPES
- - Update MetadataServicePatcher.API_VERSION - Ensure you have a Document Folder called MetadataServicePatcher (Developer Name) - Run the following code from execute annoynmous in Developer Console MetadataServicePatcher.patch(); - Verify this has created a MetadataServicePatched Document in the abov folder
- - Update MetadataService.cls - Open the MetadataServicePatched Document and copy the code - Paste the code over the current or new MetadataService.cls class (recommend MavensMate for this as the file is some 8000+ lines long) - Check for any left over references to MetadataServiceImported in MetadataService and change them to MetadataService
- - Update MetadataServiceTest.cls - See this for guidelines http://andyinthecloud.com/2013/05/11/code-coverage-for-wsdl2apex-generated-classes - Future releases of the patch script may also generate this class - Update all the Metadata files to the latest API
but i struck up at run Patch script .
Q: can you please elaborate for how to generate MetadataService by running Patch script?
Thanks in advance.
Kommentar schreiben...
0/9000