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 with sharing class AccountManager { | |
// createAccount: Creates an account by receiving the name, number of employees, document | |
// type and document number. Returns the id of the new account | |
// Este esta bien, había que resolver try and catch, pero es mejor opción Database Save Result | |
public static Id createAccount(String name, Integer numberOfEmployees, String documentType, String documentNumber) { | |
Account anAccount = new Account( | |
Name = name, | |
NumberOfEmployees = numberOfEmployees, | |
Identification_Type__c = documentType, |