Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on an application in which it should be possible to link an account to a pricebook. Because for different accounts, different prices may be appropriate. Is there a way to directly link an account to a pricebook?

share|improve this question
up vote 2 down vote accepted

An opportunity is related to a PriceBook via the PriceBook2Id lookup. An Opportunity is tied to an an Account.

You could create a text field on Account, PriceBookId__c and stamp the id of the PriceBook permitted. Then have a validation rule on Opportunity which only permits a PriceBook whose Id matches the value stamped on the Account.

PriceBook2Id != Account.PriceBookId__c
share|improve this answer
I remember reading somewhere that using text fields with an id is considered bad practice. Is that actually true? Nonetheless, I do think this is a possible solution to my problem. Thanks – Lex Jan 6 '13 at 13:52
While its not great, it is an acceptable compromise in cases where a lookup isn't feasible. – techtrekker Jan 6 '13 at 20:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.