You need to sign in to do that
Don't have an account?
cbro
Limit Opportunity Product Selection by Opportunity Record Type
How can I limit Opportunity Product Selection to a specific Record Type?
Can I do this with Apex Code, or would this be Visualforce?
For example:
cbro
I saw this post (here (https://developer.salesforce.com/forums/ForumsMain?id=906F0000000AcxbIAC)), which may help, but any other help would be greatly appreciated.
Can I do this with Apex Code, or would this be Visualforce?
For example:
- For Record Type A, Products 1,2, and 3 should be available to select.
- For Record Type B, Product 4 only should be available to select
- For Record Type C, Products 1,4, and 5 should be available to select.
cbro
I saw this post (here (https://developer.salesforce.com/forums/ForumsMain?id=906F0000000AcxbIAC)), which may help, but any other help would be greatly appreciated.
As is shown in the thread you mentioned, the code automatically adds certain products to the opportunity at the time of creation, however, this is automatic.
If you wish to restrict the products the user should be able to see when trying to add to an opportunity depending on its record type - you will have to customize the "add Product" page and show user only the relevant products.
This will need both VF and controller.