another blog


About Microsoft Dynamics GP :-)

Don’t do Ctrl+S (Save Source)

If you are a dexterity developer then avoid using Ctrl+S. Sometimes it happened we start scripting and when try to compile the code got message
of unknown identifier and usually do Ctrl+S, then add the missing identifiers (filed,table etc) and forget to compile the script. So script is there but not compiled. IMHO whole dictionary should be complied before creating a chunk for deployment otherwise below error will occur.

“FP: Script not found errors”.


Filed under: Dexterity Development, Dynamics GP, dynamics-gp, , , , , , ,

How to make focus trigger script run only when alternate window is marked.

How to make focus trigger script run only when alternate window is marked.

It’s something we always need, to only run our code when alternate dynamics GP window is marked. When Dynamics GP gets its focus triggers registered, it doesn’t do it on the bases of product.

The Trigger_RegisterFocus() function registers a focus trigger for use with the run-time engine. Focus triggers are activated by “focus” events in an application, such as a window opening or closing, or the focus moving from one field to the next.Focus triggers require that you specify the object that activates the trigger (such as a window, form or field), the focus event for that object (such as a pre, change or post event), and the procedure you want to run in response to the trigger.

When Dynamics GP login, it register triggers from all products through a “Startup” procedure. For multiple applications, “Startup” procedures run in the order in which the applications are listed in the launch file. Let’s say we have a custom application dictionary “AOGPP.DIC”, having focus trigger on “sop type” change.


local integer l_result;

l_result =  Trigger_RegisterFocus(anonymous(‘SOP Type’ of window SOP_Entry of form SOP_Entry),


if l_result SY_NOERR then

warning ” trigger registration failed.”;

end if;


We want to run our script when our alternate sales transaction window is marked for the user.We can do it by using alternate modified tables records, another way we can do it by using exception handling script.


We will create a local field ‘(L) runme’ on sales transaction window and put our code there (whatever needs to be done of trigger script) and on trigger script we will execute that code by using run script method.

Trigger Script: sopChange

local integer product_ID;

product_ID = Runtime_GetCurrentProductID();

if product_ID=9999 then


run script ‘(L) runme’ of window SOP_Entry of form SOP_Entry;


{do nothing }


{do nothing}

end try;

end if;

On local field ‘(L) runme’, we will write our code. For testing purpose; just put a warning there

warning “I hate hello world Programs.”;

Now code will run only when alternate window is marked. 🙂

That’s it. 🙂

How to make focus trigger script run only when alternate window is marked.

Filed under: Dexterity Development, Dynamics GP, dynamics-gp, ,

How can I increase the Dynamics GP field size?

Usually people want to know could they increase the field size of GP tables?

The simple answer is we cannot increase the length of the dynamics GP fields.  To understand why that so we need to know the deployment process of GP customization. To deploy customization in GP we need to extract our work and create a chunk and then add a code inside GP.

The Extract utility copies, or “extracts” new resources we’ve added to the development dictionary (with resource IDs of 22,000 and greater), and places them in a new dictionary. This process excludes any Microsoft Dynamics GP resources, Since Dexterity numbers these resources below 22,000. Although our dictionary doesn’t contain any Microsoft Dynamics GP resources, it maintains references to any main product resources we may have used.

The following illustration shows a development dictionary and the process for building a third-party dictionary.


This is true for “GP Fields” as well (as they are resources too). But it doesn’t mean nothing can be done. By customization this could be achieved for forms and reports. Not simple but workable task.

How can I increase the Dynamics GP field size?

Filed under: Dexterity Development, Dynamics GP, dynamics-gp,

Project data has not been entered for this customer.

When trying to create new contract for the customer ID ‘WORLDENT0001’, got following message.

“Project data has not been entered for this customer.”

To get rid of this message, go to customer maintenance window, browse the customer, open ‘PA Customer Option’ window through Project button. Just click “OK” and close the window, and it will allow entering contract for the customer. (Definitely if things need to be setup on PA customer option window then we will select options there). This window copy customer information on PA_Customer_MSTR table (PA00501).

That’s It.

Friday,14 Sep 2012

Project data has not been entered for this customer.

Filed under: Project Accounting,

Cross Dictionary Dexterity Development and DEX.DIC

I am sharing trigger we have talked about in David’s Blog, I have used it many years ago for DEX.DIC dictionary of Dynamics GP version 9.

local integer l_result;   

l_result = Trigger_RegisterFocusByName(1,”window ‘Screen Output’ of form ‘Reports Screen'”,

2,2,script YourScript);

if l_result SY_NOERR then

    warning str(l_result);

end if;

Syntax Trigger_RegisterFocusByName(product_ID, qualified_resource, focus_type,

attach_type, script processing_procedure {, tag})

  • Constant Values for focus_type

  1. TRIGGER_FOCUS_PRE             0
  3. TRIGGER_FOCUS_POST          2
  4. TRIGGER_FOCUS_PRINT         3
  6. TRIGGER_FOCUS_FILL            5
  •  Constant Values for attach_type


Cross Dictionary Dexterity Development and DEX.DIC

Filed under: Dexterity Development, Dexterity Triggers, Dynamics GP, dynamics-gp, , , , ,


Enter your email address to follow this blog and receive notifications of new posts by email.

Enter your email address to follow this blog and receive notifications of new posts by email.


Error: Please make sure the Twitter account is public.

Blog Stats

  • 9,913 hits

RSS dynamics-gp

  • VSTools and database triggers.
    In SanScript coding we have database triggers, Below is a detail of what database triggers are as explained in dexterity manuals. Database triggers Database triggers are activated by successful table operations, such as a record begin read, saved, or deleted. The procedure that runs in response to a database trigger has access to the same […]
  • 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, […]
  • Hints and Tips… On going Post
    This is on going post and points will be added from time to time. 🙂 .. with Field Level Security we can not restrict document access on Sales transaction entry Window. Means we can not make user to choose only ‘Invoices’ in SOP Type drop down. .. we can not add custom table in table […]
  • Reversing the sort order of Receivable Transaction Inquiry – Customer by Document Date
    Last few months we got more request on changing sort orders of Inquiry windows and lookups and to cover them all in a one place I have been working on a small project which will provide a simple sorting without much effort. In Dynamics Community there was a post having similar situation, I have already […]
  • Getting the current open window in .net GP Add In
    There are many ways of getting information of active window in GP, but it changes according to the developing tool we are working on. 1.Dexterity.(the best tool 🙂
  • Not all RW_Function are meant for reports.
    There are lots of RW functions available in a report writer Calculated Field Definition window and almost all of them are so handy while working on report writer, but it is a matter of fact that some of them are not actually meant for report writer. Usually RW functions are associated with report writer and […]
  • Dexterity Can Wait and Respond.
  • Cross Dictionary Development.    
  • Calling Sales Document Numbers Lookup
    Often developers need to open available lookup on their custom form from dynamics GP.Sales Document Number lookup is a very common and much used lookup and every dynamics technical person needs to call it in once (or more) in their lifetime. 🙂 Dynamics GP SDK provide a prototype of coding on how to open various […]
  • This datatype name is already in use.
    This datatype name is already in use.
Ghostriver Studios Blog

Sculptural stained glass of Andrew Kosorok

Coding Notes

Code, News, Tech & Stuff

Dynamics GP Builders & Reporting

How to use MS Dynamics SmartList Builder, Excel Report Builder and other Reporting tools to get the data and analysis you need.

%d bloggers like this: