Jump to content
Salesforce and other SMB Solutions are coming soon. ×

jjfm90
 Share

Recommended Posts

I am trying to find a way to set an auto enter serial number for a field, but to do it by customer. When I have customer "A" they start at "1", and customer "B" starts at "1". As I add assets to each of them, only their group of serial numbers increase.

 

Table 1, contacts_table

Table 2, asset_lots (groups of assets base on customer)

Table 3, line_items (each item must have a new generated serial number, specific to the lot, and these are tied back to the order, and customer)

 

I have all of the tables set with relationships etc, I just can't figure out how to set a unique serial number grouping by customer.

 

Any help would be greatly appreciated.

Link to comment
Share on other sites

This may be easier to parse out but can you give a concrete example of what is in the fields and the output you would like to see?

Link to comment
Share on other sites

Table 4: Customers — contains customer name, customer ID, and LastSerialNumber

 

 

Each time you make a new record in whatever table you're wanting separate serials by customer, run a script that updates LastSerialNumber by 1 and then populates the local record with that value.

 

Under the hood, make sure you don't use this field in relationships; use a real serial number that is completely unique and doesn't reoccur across different customers.

Link to comment
Share on other sites

 Share



×
×
  • Create New...

Important Information

Terms of Use