The views and opinions expressed in this blog are those solely of the author(s) and do not necessarily reflect Microsoft’s current policy, position, or branding. For official announcements and guidance on Dynamics 365 apps and services, please visit the Microsoft Dynamics 365 Blog.
Personalized Community is here!
Quickly customize your community to find the content you seek.
Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 Release Wave 2Discover the latest updates and new features to Dynamics 365 planned through March 2021.
Release overview guides and videos Release Plan | Preview 2020 Release Wave 2 TimelineWatch the 2020 Release Wave 1 virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
I recently published a quick post to describe how to close all sessions from a single button click in Unified Service Desk (USD). You can view that post here. In this post I will describe a more elegant approach.
I take no credit for coming up with this idea. A very good friend of mine suggested this approach having read my original post. His name is Naga Srikanth Alluri. Srikanth is married to another friend of mine called Rashi. It was Srikanth who introduced me to USD and Rashi who taught me how to use it. I owe these guys so much. J
But what is this “PING/PONG” thing I hear you ask ….
In my original post, I simply ran one action after another. It was fine if you restricted the maximum number of open sessions to a fixed number but if you didn’t the approach wasn’t elegant. In this revised approach we will use just two actions.
I hope you can see that we create a “kind of” loop, with the first action calling the second. And the second calling the first. Meaning the condition is important to break out of the loop.
Steps Involved are ….
Step One – Create PING Action
Srikanth’s ping action looked like this. So not forget the condition! You will dive into an endless loop if you miss it!!
Step Two – Create PONG Action
This is going to be exactly the same as my ping. Again, don’t forget the condition!
Step Three – Set sub-actions on PING and PONG
Now you need to access the sub actions on these two actions. The PING will have a sub action of the PONG. And the PONG will have a sub-action of PING.
This process simply involves opening the Sub Action Calls option.
And adding in either PING or PONG!
Step Four – Add an Action to a Toolbar
Finally, we need to add the PING action into a toolbar button.
Below you can see my toolbar button.
I’ve given it am image called CloseQuote_16. I found this in the image resources in the Dynamics 365 SDK. You could use another image or leave blank.
Notice my enable and visible conditions. I added this as I only wanted the button to show when I have 2 or more sessions open. [[$Session.Count]g]>1
My button finally looked like this. Notice I have two sessions open which is why the button is showing.
Thanks again Srikanth. This is a great approach to this problem and shows us how we can have a “loop” in USD.
Business Applications communities