public async void Login() { var salesforceClient = new SalesforceClient(); var loginResult = await salesforceClient.Login(_username, _password, _organizationId); Assert.IsNotNull(loginResult); }
private static async Task CreateExternalIdField(string objectName, string fieldName) { var salesforceClient = new SalesforceClient(); var loginResult = await salesforceClient.Login(_username, _password, _organizationId); await salesforceClient.CreateCustomField(objectName, fieldName, loginResult.SessionId, loginResult.MetadataServerUrl, true); }
public async void CreateConnectedApp() { var salesforceClient = new SalesforceClient(); var loginResult = await salesforceClient.Login(_username, _password, _organizationId); var fullName = "fullName"; var label = "label"; var contactEmail = "*****@*****.**"; var callbackUrl = "callback://url"; var connectedAppResult = await salesforceClient.CreateConnectedApp <dynamic>( fullName, label, contactEmail, callbackUrl, loginResult.SessionId, loginResult.MetadataServerUrl); Assert.IsNotNull(connectedAppResult); }
public async void CreateObjectAndField() { var customObject = "MyCustomObject"; var standardObject = "Account"; var customField = "MyCustomField__c"; var salesforceClient = new SalesforceClient(); var loginResult = await salesforceClient.Login(_username, _password, _organizationId); var createObjectResult = await salesforceClient.CreateCustomObject(customObject, loginResult.SessionId, loginResult.MetadataServerUrl); Assert.IsNotNull(createObjectResult); var createFieldResult = await salesforceClient.CreateCustomField(customObject + "__c", customField, loginResult.SessionId, loginResult.MetadataServerUrl); Assert.IsNotNull(createFieldResult); var createFieldResult2 = await salesforceClient.CreateCustomField(standardObject, customField, loginResult.SessionId, loginResult.MetadataServerUrl); Assert.IsNotNull(createFieldResult2); }
private static async Task CreateExternalIdField(string objectName, string fieldName) { var salesforceClient = new SalesforceClient(); var loginResult = await salesforceClient.Login(_username, _password, _organizationId); await salesforceClient.CreateCustomField(objectName, fieldName, loginResult.SessionId, loginResult.MetadataServerUrl, true); }