Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Modifier/VBA question

Posted on by

Hello,

I'm working on a customization for a customer to display two fields on the Sales Transaction Entry window.  They want to see the Payment Terms ID that is on the customer's card, and the Payment Terms ID selected for the sales document.to verify any discrepancies.  Both fields are display only, and simply read what is in the RM00100 table for the customer, and the SOP10100 table for the document.  I have the fields and code done and it works fine with one issue. 

Apparently by populating two text boxes on Before Window Activate or Window Activate, I'm making the form "dirty", and the Save/Delete/Cancel modal dialog comes up, even when using the record scroll buttons at the bottom to go from one record to the next and not changing anything on the document.  With each scroll button click, you have to click Save.  I don't want to just set dirty=false after my fields are populated in case the user HAS changed something.  Since I'm not saving the data with the document, I'm wondering if there is a way to "ignore" my fields?

Anyone have some experience with this they would be willing to pass on?

Larry Patterson

Categories:
  • Suggested answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    David Musgrave MVP ... 13,928 Most Valuable Professional on at
    RE: Modifier/VBA question

    Hi Larry

    You will need to look at the changed flag before your code and restore that value after your code.

    Better still change the modified window and alter the SetChangeFlag Object property to false.

    Even better still use GP Power Tools to do the customisations as you have much more control over everything. It works on Windows Server and Web client and has no extra upgrade or deployment steps.

    David

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans