web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Refresh Business Process Flow

(0) ShareShare
ReportReport
Posted on by 360

Hi all, i guess all of us know that bpf can change its path depending on the value of a field. If the user changes its value, the path changes. 

But if that value was set programatically via javascript (using setValue of the corresponding attribute), the path didn't get updated.

I'm open to supported and unsupported way of either:

1) update/refresh the path of the bpf to get it to "reflow"

2) fire a changed event on the bpf header field to achieve 1)

3) fire an attribute changed event of the bpf to achieve 1)

Thanks!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Hasibur Rahman Profile Picture
    on at

    I recently did something similar but that was through a custom WFA to change the stage

    I recently did something like this with Lead

                 string fetchXMLLead =

                                  "<fetch mapping='logical'>" +

                                      "<entity name='lead'>" +

                                          "<attribute name='stageid' />" +

                                          "<attribute name='processid' />" +

                                          "<attribute name='statecode' />" +

                                          "<filter type='and'>" +

                                              "<condition attribute='leadid' operator='eq' value='" + context.PrimaryEntityId.ToString().Replace("}", "").Replace("}", "") + "' />" +

                                          "</filter>" +

                                      "</entity>" +

                                  "</fetch>";

                  EntityCollection entCollectionLead = Service.RetrieveMultiple(new FetchExpression(fetchXMLLead));

                  if (entCollectionLead.Entities.Count > 0)

                  {

                      CurrentLeadRecord = entCollectionLead.Entities[0];

                      string currentLeadRecordStatusValue = ((OptionSetValue)CurrentLeadRecord["statecode"]).Value.ToString();

                      if (currentLeadRecordStatusValue.Equals(StateValueForOpen))

                      {

                          changeStage("Propose");

                      }

                      else

                      {

                          changeStage("Close");

                      }

                  }

  • Kenneth Leong Profile Picture
    360 on at

    i was actually looking for a client side solution

  • Verified answer
    Kenneth Leong Profile Picture
    360 on at

    well for those who needs it - it turns out it was very easy - after you did a setvalue on the corresponding bpf attribute, you have to call fireOnChange(). That will trigger the attribute on change and eventually bubble up to the bpf, which will in turn update the path.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans