Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Order Entity (Potential Customer field) + workflow to differentiate between contact and account

Posted on by 330

I have a requirement , on the order entity there is a new field called integrate to GP (two options yes or No)

so if an order was made by a contact the field will be set to No

But if it was made by an account the field will be set to yet

The issue is that on the order entity the is just one look up which is potential customer and it has both account and contact.

I suggested creating two new look ups to contact and account but this will not fit the requirement.

so is it possible create a workflow that checks if the customer is a contact or an account then make a decision?

Have already tried this and its not possible,

So please how else can i achieve this, am also capable of writing plugins so what is the best way to do this 

for example say 

if (regardingobjectidType = "account"){
set gp value to yes
}

else {
set gp value to no
}


looking forward to suggestions.

regards.

*This post is locked for comments

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Order Entity (Potential Customer field) + workflow to differentiate between contact and account

    This should work fine also.

  • lawix10 Profile Picture
    lawix10 330 on at
    RE: Order Entity (Potential Customer field) + workflow to differentiate between contact and account

    Thanks I have seen it now, already started with the plugins

    just in case i need to do more logical things

    so am looking at this 

    var customer = entity.GetAttributeValue<EntityReference>("customerid");
    
    if (customer.LogicalName=="account"){
    
    set gp value
    }

    will this work?


    other wise you are spot on

  • Verified answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Order Entity (Potential Customer field) + workflow to differentiate between contact and account

    This is definitely possible. Here is screenshot that demonstrates how to do that:

    SO_5F00_WF.png

    Good luck!

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,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans