SBX - Search With Button

SBX - Forum Post Title

Linking a new opportunity to past opportunities within the same account based on a field entry

Microsoft Dynamics CRM Forum

GrantEp asked a question on 17 May 2019 3:32 PM

Question Status

Verified

Please let me know if this is possible, and how to best do it (or research it).

Assume I am entering a new opportunity for a lead/client.  As a part of creating this opportunity, I am entering a part number (from a drop down menu).  Is there a way to have a blank field that will populate with a past opportunity for that contact or account that used the same part?

Reply
Verified Answer

I assume  you want to populate this past opportunity lookup on the new opportunity record? If so do you want that to be populated as soon as you selected the part number from Drop Down or is it ok if it populates when you save the record?

01. If you want it to be populated as soon as you select the value from Drop Down, you have to write javascript to query and get the old opportunity with the same part number - Will there be more than one past opportunity with the same part number? if so you have to consider how you are going to deal with that

02. If you are happy with it being populated when you save the record, you can create a plugin or Workflow with a custom Workflow Activity to query and populate the old opportunity lookup if there is any with the same part number.

Reply
GrantEp responded on 20 May 2019 7:45 AM

Thank you

Reply
Verified Answer

I assume  you want to populate this past opportunity lookup on the new opportunity record? If so do you want that to be populated as soon as you selected the part number from Drop Down or is it ok if it populates when you save the record?

01. If you want it to be populated as soon as you select the value from Drop Down, you have to write javascript to query and get the old opportunity with the same part number - Will there be more than one past opportunity with the same part number? if so you have to consider how you are going to deal with that

02. If you are happy with it being populated when you save the record, you can create a plugin or Workflow with a custom Workflow Activity to query and populate the old opportunity lookup if there is any with the same part number.

Reply

SBX - Two Col Forum

SBX - Migrated JS