• imzey
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Hi. I'm looking to create some Apex code that changes the record type of an opportunity to 'Multi' when brands/products from more than one Product Family are added to a single opportunity.

 

So the workflow is this:

 

1. User clicks New button to create a new opportunity

2. User chooses a record type for that opty -- Media, Events, etc.

3. User fills in opportunity info and chooses various products/brands to attach to that opty. Each brand/product has a Product Family.

4. Apex code is triggered when brands/products are added to the opty that are from more than one Product Family (not necessarily just two or more products, which could all be from the same Product Family) -- this would trigger the record type for that opty to be a) changed to Multi and b) the record type set to read-only. (optional) If the products/brands for that opty are changed again, the record type would revert to the original record type.

 

I'm not an Apex developer and I'm not sure where to start here. I'm hoping someone can point me in the right direction. Thanks in advance.