• Håkan Löfqvist
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

We have ONE object with 3 different record types:

 

1. Purchase Orders (PO)

2. Invoices (Inv)

3. Official Receipts (OR)

 

There are three different operating branches that uses these, example as below:

 

1. New York

2. Sydney

3. Paris

 

We want to have different auto-numbers for these 3 different record types for these 3 different branches. Example as follows:

 

NY-PO-1001

NY-PO-1002

SYD-PO-1001

SYD-PO-1002

PA-PO-1001

PA-PO-1002

NY-Inv-1001

NY-Inv-1002

SYD-Inv-1001

SYD-Inv-1002

PA-Inv-1001

PA-Inv-1002

NY-OR-1001

NY-OR-1002

SYD-OR-1001

SYD-OR-1002

PA-OR-1001

PA-OR-1002

 

Using Auto-Numbers in Salesforce produces the result below, which we DO NOT WANT:

 

NY-PO-1001

NY-PO-1002

SYD-PO-1003

SYD-PO-1004

PA-PO-1005

PA-PO-1006

NY-Inv-1007

NY-Inv-1008

SYD-Inv-1009

SYD-Inv-1010

PA-Inv-1011

PA-Inv-1012

NY-OR-1013

NY-OR-1014

SYD-OR-1015

SYD-OR-1016

PA-OR-1017

PA-OR-1018

 

What is the solution without APEX or triggers for this?

 

If there is no standard solution in Salesforce, what do we need to do for APEX / Triggers to resolve the above?