Username: Save?
Password:
Home Forum Links Search Login Register*
    News: Welcome to the TechnoWorldInc! Community!
Recent Updates
[October 17, 2024, 05:05:06 PM]

[October 17, 2024, 04:53:18 PM]

[October 17, 2024, 04:53:18 PM]

[October 17, 2024, 04:53:18 PM]

[October 17, 2024, 04:53:18 PM]

[September 09, 2024, 12:27:25 PM]

[September 09, 2024, 12:27:25 PM]

[September 09, 2024, 12:27:25 PM]

[September 09, 2024, 12:27:25 PM]

[August 10, 2024, 12:34:30 PM]

[August 10, 2024, 12:34:30 PM]

[August 10, 2024, 12:34:30 PM]

[August 10, 2024, 12:34:30 PM]
Subscriptions
Get Latest Tech Updates For Free!
Resources
   Travelikers
   Funistan
   PrettyGalz
   Techlap
   FreeThemes
   Videsta
   Glamistan
   BachatMela
   GlamGalz
   Techzug
   Vidsage
   Funzug
   WorldHostInc
   Funfani
   FilmyMama
   Uploaded.Tech
   MegaPixelShop
   Netens
   Funotic
   FreeJobsInc
   FilesPark
Participate in the fastest growing Technical Encyclopedia! This website is 100% Free. Please register or login using the login box above if you have already registered. You will need to be logged in to reply, make new topics and to access all the areas. Registration is free! Click Here To Register.
+ Techno World Inc - The Best Technical Encyclopedia Online! » Forum » THE TECHNO CLUB [ TECHNOWORLDINC.COM ] » Techno Articles » Internet
 Dexterity Trigger – Microsoft Great Plains customization example
Pages: [1]   Go Down
  Print  
Author Topic: Dexterity Trigger – Microsoft Great Plains customization example  (Read 537 times)
Shawn Tracer
TWI Hero
**********


Karma: 2
Offline Offline

Posts: 16072


View Profile
Dexterity Trigger – Microsoft Great Plains customization example
« Posted: February 25, 2008, 01:14:36 PM »


Dexterity Trigger – Microsoft Great Plains customization example
 by: Andrew Karasev

Microsoft Great Plains has multiple customization options, you can use SQL programming from the back end, or VBA/Modifier to slightly improve end-user interface. The most flexible mechanism is Great Plains Dexterity customization. Dexterity is programming language and environment, the whole Great Plains is written on. Dexterity, however requires some training or self preparation, before you do the coding itself. In this small article we would like to give you Dexterity trigger example. You can install Dexterity from Microsoft Great Plains CD#2.

The trigger calculates QTY quoted for the inventory item and places the result into “Quantity Quoted” custom field, plus it updates QTY available – subtracts QTY on orders, the trigger fires when we open IV_Item_Inquiry window.

Now lets look at the trigger body:

AST_Update_Qtys – this is the name of the trigger

{* Trigger for after Display Existing Record of IV_Item_Inquiry. *}

{* Part 1 *}
{* Used to calculate and display the qty quoted and subtract the *}
{* qty on orders from the qty available.                         *}
local currency lc_qty_quoted.

clear field '(L) Quantity Quoted' of window IV_Item_Inquiry of form IV_Item_Inquiry.
set precision of '(L) Quantity Quoted' of window IV_Item_Inquiry
      of form IV_Item_Inquiry to 'Decimal Places QTYS' of file IV_Item_MSTR - 1.

{* If based on site and site blank, set quoted to 0. *}
if '(L) Display Options' of window IV_Item_Inquiry of form IV_Item_Inquiry = 1 and
      'Location Code' of window IV_Item_Inquiry of form IV_Item_Inquiry = ""
then
   set '(L) Quantity Quoted' of window IV_Item_Inquiry of form IV_Item_Inquiry to 0.
   abort script.
end if.

lc_qty_quoted = rw_qty_quoted_site('Item Number' of window IV_Item_Inquiry
      of form IV_Item_Inquiry, 'Location Code' of window IV_Item_Inquiry
      of form IV_Item_Inquiry).
set '(L) Quantity Quoted' of window IV_Item_Inquiry of form IV_Item_Inquiry
      to lc_qty_quoted.
set '(L) Quantity Available' of window IV_Item_Inquiry of form IV_Item_Inquiry
      to '(L) Quantity Available' of window IV_Item_Inquiry
      of form IV_Item_Inquiry - lc_qty_quoted.
      
{* Part 2 *}
{* Used to populate the list price. *}
set 'List Price' of window IV_Item_Inquiry of form IV_Item_Inquiry to 'List Price'
   of table IV_Item_MSTR.

And this is how you do register the trigger:

Startup – script

local integer l_result.

l_result = Trigger_RegisterFocus(anonymous('Display Existing Record'
      of window IV_Item_Inquiry of form IV_Item_Inquiry), TRIGGER_FOCUS_CHANGE,
      TRIGGER_AFTER_ORIGINAL, script SB_Update_Qtys).
if l_result  SY_NOERR then
   warning "Focus trigger registration failed.".
end if.

Let us know if you need help: 1-630-961-5918, 1-866-528-0577 or [email protected]

About The Author

Andrew Karasev is Great Plains developer in Alba Spectrum Technologies ( http://www.albaspectrum.com ), serving clients in Illinois, California, New York, Florida, Arizona, Georgia, Texas, Oregon, Washington, Virginia, Canada, Australia, UK, continental Europe.

[email protected]

Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Copyright © 2006-2023 TechnoWorldInc.com. All Rights Reserved. Privacy Policy | Disclaimer
Page created in 0.101 seconds with 24 queries.