7 Replies Latest reply on Jan 20, 2017 7:26 AM by philmodjunk

    Generating account reference

    globe11123

      I'm creating a script that generates a new account reference for our customers so we can export them into SAGE at some point.

       

      The script grabs the first 3 letters of the company name and add on 01 because all accounts start on 01. It performs a search and if the account reference isn't found it sets it to the searched variable.

       

      If something is found then it will loop adding + 01 onto the variable to search for the next number along.

       

      Problem: Whenever setting the variable with + 01 it is returning i.e. DOD2 instead of DOD02. How can I get around this?

       

      Script

       

      Screen Shot 2017-01-19 at 12.42.36.png