web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Create Threshold limits for subtotal on Receivings Transaction Entry window using debugger tool

(0) ShareShare
ReportReport
Posted on by 80

I need assistance configuring a trigger based on the "Subtotal" on the 'Receiving Transaction Entry Window' by using the  debugger tool. I want it to work similar to Support Debugging Tool Customization #7 – Receiving Unit Cost Threshold Validation by Veeyeskay

http://msdynamicstips.com/2011/10/08/support-debugging-tool-customization-7-receiving-unit-cost-threshold-validation/ . With the exception of the subtotal's threshold limits being $500 +/-. It is intended to prevent an end user from saving the "Receivings Transaction Entry" screen if the Purchase order has been altered to exceed a subtotal of $500.

Can anyone assist? Thank you

Mikki

*This post is locked for comments

I have the same question (0)
  • Mikki Milligan Profile Picture
    80 on at

    This is the script. It saves without errors, but it does not show the message when the criteria is met.

    in string IN_OldValue;

    in string IN_NewValue;

    out boolean OUT_Condition;

    local 'PO Number' l_PONo;

    local 'Item Number' l_ItemNo;

    local Ord l_Ord;

    local currency l_Threshold;

    local 'Subtotal' l_SubttMIN, l_SubttMAX;

    OUT_Condition = false;

    set l_Threshold to 500.0;

    if isopen(form POP_Receivings_Entry) then

    set l_PONo to 'PO Number' of window 'Line_Scroll' of form 'POP_Receivings_Entry';

    set l_ItemNo to 'Item Number' of window 'Line_Scroll' of form 'POP_Receivings_Entry';

    set l_Ord to 'PO Line Number' of window 'Line_Scroll' of form 'POP_Receivings_Entry';

    clear table POP_POLine;

    set 'Item Number' of table POP_POLine to l_ItemNo;

    set 'PO Number' of table POP_POLine to l_PONo;

    set 'Ord' of table POP_POLine to l_Ord;

    get table POP_POLine by number 2;

    if err() = OKAY then

    set l_SubttMIN to 'Subtotal' of table POP_Receipt;

    set l_SubttMIN to l_SubttMIN - round((l_SubttMIN+l_Threshold),

    DECIMALRIGHT, ROUNDMODE_HALF_UP, 2);

    set l_SubttMAX to 'Subtotal' of table POP_Receipt;

    set l_SubttMAX to l_SubttMAX + round((l_SubttMAX+l_Threshold),

    DECIMALRIGHT, ROUNDMODE_HALF_UP, 2);

    if ('Subtotal' of window POP_Receivings_Entry of form POP_Receivings_Entry < l_SubttMIN or

    'Subtotal' of window POP_Receivings_Entry of form POP_Receivings_Entry > l_SubttMAX) then

    warning "The SUBTOTAL is greater than the threshold defined of 500!";

    OUT_Condition = true;

    end if;

    end if;

    end if;

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans