0

I need to create a primary key with combination of 4 fields, i.e. Product  + Sales Unit Of Measure + Currency + Province.

If any of the 4 fields differ, it will result in a different price for the product.

Currently the logic goes just for the region. But currently the country I have been working for is maintaining price on the basis of Sales unit of Measure.

I have added fields on the standard price page. But how do i form a primary key with the combination of these fields?

1
  • Can you elaborate more on "primary key to determine a price" ? For now I can't linked this two concepts, as primary key just determines uniqueness of record. Commented Nov 29, 2017 at 7:21

1 Answer 1

0

You can create a formula field that combines the fields like this:

Field1 + '#' + Field2 + '#' + Fiel.... ect.

Then you can query that value resulting in the unique record that stores the price of the product.

3
  • Query as in how do I query ? Commented Nov 30, 2017 at 8:08
  • You have write a small Apex trigger for that.
    – Wim
    Commented Nov 30, 2017 at 8:10
  • I am sorry , I am not getting logic Commented Nov 30, 2017 at 8:28

Not the answer you're looking for? Browse other questions tagged .