Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.