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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Answered

How to Create a Preview Form in D365FO and Open It on Button Click?

(1) ShareShare
ReportReport
Posted on by 56
Hi everyone,
 
I’m trying to create a Preview Form in Dynamics 365 Finance & Operations that behaves similarly to the “Preview results” functionality in some standard forms (e.g., Manual bulk drawdown).


 
Scenario

I have a main form where users select or calculate data. On clicking a button (Preview), I want to:
  1. Collect data from the main form.
  2. Insert it into a TempDB table.
  3. Open a new read-only preview form showing these results in a grid.
What I need help with
 
I want to understand the best practice approach for:
  • Designing a TempDB table for preview.
  • Passing the TempDB buffer from the main form to the preview form.
  • Launching the preview form using Args and a Display menu item.
  • Ensuring the preview form correctly receives the temp table records.
My current challenges
  • The preview form opens but doesn’t show any data.
  • I’m not fully sure if I’m passing the temp table buffer correctly.
  • Not sure if the temp table should be filled inside the button logic or elsewhere.
If possible, please share:
  • A simple example of the button clicked() method.
  • The correct setup for the TempDB table.
  • How to define the preview form datasource.
  • A working example of passing and displaying TempDB data using Args.
Any guidance or sample code would be greatly appreciated.
Thank you!
I have the same question (0)
  • Verified answer
    Anton Venter Profile Picture
    20,656 Super User 2026 Season 1 on at
    @Muhammad
     
    I think your temp table buffer is going out of scope. Here is a link to a blog of yours truly about using a temporary table as a datasource in a form.
     
    Using a temporary table as a datasource in a form
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Mallesh Deshapaga Profile Picture

Mallesh Deshapaga 254

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 188 Super User 2026 Season 1

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 131 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans