Getting the current active window in Dexterity.
Using dexterity there is not a direct way of getting current active window information, but with set of available GP functions and triggers can make this task happen. Below I am sharing a trigger and function which can tell the active window name. Below code needs to be changed according to the needs of developer, I have hard-coded values just to give an idea of how it can be work. There is a good discussion regarding the same topic on below dynamics community link to understand different ways of getting active window information in dex and .net.
https://community.dynamics.com/gp/f/32/t/199211?pi53330=2#responses
local long l_result;
l_result = Trigger_RegisterFunctionByName(0,
“Security”, TRIGGER_BEFORE_ORIGINAL, function getResourceID_fun);
getResourceID_fun
function returns integer i;
inout integer dictid;
in integer resourcetype;
in integer resourceid;
optional inout string strValue;
optional in boolean bolValue;
warning Resource_GetResourceName(0, 2, resourceid);
Filed under: Dexterity Triggers, Dynamics GP, Uncategorized

This was originally posted here.
*This post is locked for comments