Skip to main content

Notifications

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

  • Mikki Milligan Profile Picture
    80 on at
    RE: Create Threshold limits for subtotal on Receivings Transaction Entry window using debugger tool

    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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Almas Mahfooz Profile Picture

Almas Mahfooz 3 User Group Leader

Featured topics

Product updates

Dynamics 365 release plans