Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Add value of ParentAccount to Opportunity field when Opportunity is created

Posted on by Microsoft Employee

Hi,

I would like to achieve the following:

We have two fields:

- ParentValue (Parentaccount)

- OpportunityValue (Opportunity)

When an Opportunity is created I want the ParentValue in the OpportunityValue field. Is this possible?

i.e. ParentValue=80, when Opportunity is created OpportunityValue=80. When ParentValue changes to 90 then OpportunityValue remains 80.

There is a relationship between Opportunity > Account > ParentAccount.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Add value of ParentAccount to Opportunity field when Opportunity is created

    What are those field type ParentValue and OpportunityValue?

    field type = 'Whole Number'

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Add value of ParentAccount to Opportunity field when Opportunity is created

    Assuming that the relationship between Opportunity and Parent Account is N:1, you can trigger a workflow on create of an opportunity and set the value of OpptyValue to that of ParentValue (ParentAccount).

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Add value of ParentAccount to Opportunity field when Opportunity is created

    Hi ,

    What are those field type ParentValue and OpportunityValue?

    When an Opportunity is created I want the ParentValue in the OpportunityValue field. Is this possible?

    If those field type  is not lookup(different entity type) you can create workflow to set the value after creation.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Add value of ParentAccount to Opportunity field when Opportunity is created

    Hi,

    Thanks for you answer.

    Do I need to create a workflow to populate the OpportunityValue field? What settings should this custom field have?

    Populating the field only when the Opportunity is created is exactly what we need. 

  • Suggested answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: Add value of ParentAccount to Opportunity field when Opportunity is created

    Hi,

    If I understand your question correctly, you want to auto populate value in opportunity from the parent account. You can use existing system relationship mapping and map your custom fields from Account->Opporunity, but keep in mind it will only work when you will create opportunity from the account so it will copy parentvalue to opportunity value, if parentvalue changes later it won't change opportunityvalue.

    Another option is , you can write js code on the account lookup in opportunity , when someone creating opportunity they will select account and it will autopopulate parentvalue to opportunityvalue just like this: http://himbap.com/blog/?p=2874

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans