Skip to main content
Temitayo Akinnaike 님이 #Data Management에 질문했습니다
 We are looking to set up the system to automatically assign unique customer & supplier numbers rather than using the customer name (as this may change in the system).

 

 The idea is that the numbering convention will allow us easily identify our customers and suppliers.

 

Has any one ever tried this and if so could you please let me know what convention you finally settled with and how you were able to do the custom autonumbering 

 

Thanks a bunch

 

Temi

 

 
답변 3개
  1. Lakhan Meghani (Cube84) Forum Ambassador
    2020년 8월 16일 오후 6:45
    Hi Temi

     

    This is the best idea as it looks similar to the unique human identification like PAN card.

     

    This can be achieved

     

    Rather, i would say, generate a unique key with consists of alphabet plus numbers.....

     

    Say for customers it would be - ABC- [random3DigitNumber]

     

    Say for suppliers it would be- XYZ-[random3DigitNumber]

     

    You can set autonumber of 3 digit in place of 3DigitRandom number.

     

    This can be done by crypto

     

    https://developer.salesforce.com/forums/?id=9060G000000BdOYQA0

     

    ​https://salesforce.stackexchange.com/questions/233226/best-way-of-generating-a-random-number/233234#233234

     

    .

     

    https://www.sfdcpoint.com/salesforce/apex-random-number-salesforce/#:~:text=Many%20time%20we%20have%20requirement,0.0%20and%20less%20than%201.0.

     

    If have to write trigger on the record insertion of customer and supplier record

     

    Let if know if it works for you

     

    Thanks

     

     
0/9000