Find Process Builder Name by Id

Deployment errors can be hard to track down when they give vague descriptions like when a Process Builder encounters an error. You end up with something like this. System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_EXECUTE_FLOW_TRIGGER, The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed … Read more

Re-format a Phone Number using Apex

Below is a static method that will reformat a phone number. The method removes characters, and it will check for strings of numbers that are 10 or 11 digits long. The logic would need to be changed to process international numbers. private static String FormatPhone(String Phone) { string nondigits = ‘[^0-9]’; string PhoneDigits; // remove … Read more