AX7: Delete a User Session in the WHS Mobile Device Portal

One and a half year ago I posted an article which showed how to reset a user session in the Mobile Device Portal inside of the AX WHS module. Today I want to post an update on this issue and show you how to do that in AX 7 / Dynamics 365 for Finance and Operations.

Good news up front – there are only two rows to change!

TLDR: Delete the line realated to your WHSUserId in the WHSWorkUserSession table, to completly reset your user session.

Like last time,  we create a new class which extends RunBase.

Declaration:

Methods:

Add a main method and get your dialog being prompted.

As we still want to select the WHSUserId we will override the lookup method, like we did it in AX 2012.

Here you can see the two changes that I did, to run the AX 2012 code in AX 7. First we have to align the access modifier, I just set it to public.

Next we want to reference a FormBuildStringControl instead of a FormStringControl, else we get a cast error.


Now the lookup override, exactly the same like it was in AX 2012.

And the actual reset, also unchanged.

Delete the WHS User Session in AX 7:

Like you will see, the dialog window changed slightly but the function is still the same.

AX7 WMDP Delete User Session

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *