This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomMetadataClient { | |
static public Database.UpsertResult upsertMetadata(SObjectType objectType, Map<SObjectField,Object> record) { | |
return upsertMetadata(objectType, new List<Map<SObjectField,Object>>{record})[0]; | |
} | |
static public List<Database.UpsertResult> upsertMetadata(SObjectType type, List<Map<SObjectField,Object>> metadatas) { | |
if (Test.isRunningTest()) Test.setMock(WebServiceMock.class, new UpsertMetadataMock()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<macrodef name="execanon" description="Executes apex code in an organization - Revision 7"> | |
<text name="apexcode" /> | |
<attribute name="username" /> | |
<attribute name="password" /> | |
<attribute name="serverurl" default="https://login.salesforce.com" /> | |
<attribute name="apiVersion" default="44.0" /> | |
<sequential> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<macrodef name="snapshot" description="Snapshots all metadata in an organization - Revision 22"> | |
<attribute name="username" /> | |
<attribute name="password" /> | |
<attribute name="serverurl" default="https://login.salesforce.com" /> | |
<attribute name="outPath" default="temp/snapshot" description="Directory to write snapshot." /> | |
<sequential> | |
<!-- prompt user to confirm --> |