Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

UII Context: What exactly is ForceChange field?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

We have noticed that there is a GUID, named "ForceChange" present on the UII context XML.

When we override the WpfHostedControl NotifyContextChange we saw that Unified Service Desk framework calls it several times, always with a different "ForceChange" value even if all others remain exactly the same.

Could anyone please explain the purpose of this field?

Example. When a control, with Session scope, is first loaded (i.e. a new USD session was created), we noticed the framework called 3x the NotifyContextChange method, and the only change in the context was the "ForceChange" GUID.

After the above, the control's Loaded event is invoked.

Thank you.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: UII Context: What exactly is ForceChange field?

    Hi Srikanth,

    The motivation is to notify all solution components (bounded to an USD Session) that some data has been added/updated in the UII context.

    In broad terms, one part of our solution has a component that performs searches in Dynamics, based on some inbound data coming from outside CRM. Part of this process is creating an USD Session. Once these searches are performed, and some consolidation steps are done, we apply changes to the UII Context and call NotifyContextChange so that other components (ours and, possibly, components implemented by others) can react to the new changes. We could perhaps do it in another way, but we used this hoping only controls running in the scope of the associated USD Session would get to handle this event.

    It seemed natural to use this mechanism. The online documentation does not inform of the inner workings of this mechanism, besides stating that the Context "Works in a manner simuliar to the ASP.Net session" (spelling error included ;))

    We were not able to find the information about the behavior of NotifyContextChange. Could you kindly point us in the direction of that info?

    Thank you for your answer!

    -- jars

  • Suggested answer
    ansrikanth Profile Picture
    ansrikanth 3,115 on at
    RE: UII Context: What exactly is ForceChange field?

    Hi

    I'm not pretty sure what is this ForceChange, but it is said that - the NotifyContextChange was supposed to fire multiple times which is based on No Of Controls loaded, No of Sessions loaded and some more factors. It is recommended to use this Overriden method carefully as it will fire multiple times.

    May I know the reason behind?

    Regards

    -Srikanth

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,375 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans