Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

How can i access the required fields in a Business Process Flow Stage in code

Posted on by 16

I am trying to write a powerautomate (may end up being a plugin) that when you create an appointment on an opportunity, just lists the fields that still need to be entered in the current stage.

From the new created phone call, i can get the Opportunity ID, I can get the instance of Business Process Flow against it, and i can even see what the current active stage is.

What i cannot seem to get is the fields under that stage.

Thanks in advance.

  • Suggested answer
    Kolling Profile Picture
    Kolling 16 on at
    RE: How can i access the required fields in a Business Process Flow Stage in code

    yeah i was coming to the same conclusion as this, I have found the XML clientdata but its not user friendly to work with. Thanks for confirming I am on the right lines!!

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: How can i access the required fields in a Business Process Flow Stage in code

    Hi,

    I don't think you can ealisy get the list of fields per stage because it is stored in XML format in database.

    The workaround is to store the comma separated fields name in custom configuration entity and fetch the fields name from power automate by querying this custom configuration entity.

    You can have below fields in your Custom Configuration Entity -

    Entity Name -> To store the Entity Name BOF belongs  to 

    Name -> Stage Name

    Fields -> Comma separated list of fields name

    Sample Records in your Configuration Table

    Opportunity

    Identify

    new_field1,new_field2

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • Kolling Profile Picture
    Kolling 16 on at
    RE: How can i access the required fields in a Business Process Flow Stage in code

    Hi Abdul

    Do you know what function() I need to use?

    Mike

  • Suggested answer
    Abdul Wahab Profile Picture
    Abdul Wahab 12,070 Super User 2024 Season 1 on at
    RE: How can i access the required fields in a Business Process Flow Stage in code

    Hi Kolling,

    According to me, it is a metadata call. You need to use the business process flow-id in the retrieval request.

    Thanks

    Regards,

    Abdul Wahab

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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans