another blog

Icon

About Microsoft Dynamics GP :-)

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);

 

 

 

 

Advertisements

Filed under: Dexterity Triggers, Dynamics GP, Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: