Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

How to refresh a grid in SL

(0) ShareShare
ReportReport
Posted on by 95

Hello,

I am hoping someone might be able to shed some light on grids for me.  I have written a customization that, when a button is pushed on the Service Contract Maintenance Equipment subscreen, runs a stored procedure which accepts the contract ID as a parameter and inserts records into the smconequipment table.  However, in order for the user to see the inserted records in the grid on the screen, he/she has to close the subscreen and the parent screen and reload them both. 

I am looking for a way to refresh the screen programatically in order to prevent the user from having to close and re-open the screen.

Any suggestions would be very much appreciated.

Thanks,

John

 

 

*This post is locked for comments

  • John Kowalke Profile Picture
    95 on at
    Re: How to refresh a grid in SL

    Barry,

    Once again you have saved the day. Edit_Cancel did the trick. Thanks very much.

    John

  • Verified answer
    Barry Flynn Profile Picture
    3,090 on at
    Re: How to refresh a grid in SL

    John

    I'm not familiar with that screen, or that table...

    Nevertheless...

    One possibility might be to do an Edit_Cancel.

    That effectively re-loads the current document.

    Alternatively you could try CallChks on the screen's key fields.

    In both cases, it may be necessary to check whether a Save is required first (TestLevelChg from memory.)

    If there are unsaved changes, you can do a Save yourself (Edit_Save).

    But I prefer to put up a message to the operator telling them they must Save.

    After all, it is possible that the operator was just "looking around" and had no intention of ever doing a Save.

    As a general observation, I don't like code that does a Save without the operator being aware of it.

    That's a couple of general thoughts.

    Barry

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 >

Featured topics

Product updates

Dynamics 365 release plans