Skip to main content

Notifications

Announcements

No record found.

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
    John Kowalke 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
    Barry Flynn 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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,407 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans