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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Populate the Tempdb datasource for form on button click event

(1) ShareShare
ReportReport
Posted on by 364
Hello 
I have a Tempdb table as a form data source. 
I need to populate the Tempdb table with data on opening the form. For this I am inserting data in the Init method of the form data source with below steps
Created a variable for the Tempdb table and inserted records in it.
Now FormdatasourceName.linkPhysicalTableInstance(tembdbvariable) which is loading the data fine.
I have a button on the form and on clicking it I need to again populate the Tempdb data source and display data for which I followed the same steps above and it gives me the below error

Cannot execute the required database operation. The method is only applicable to TempDB table variables that are not linked to existing physical table instance
 
I followed some blogs but couldn't understand the steps.
 
Thanks 
SKO
 
I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    236,652 Most Valuable Professional on at
    Populate the Tempdb datasource for form on button click event
    You don't need to use linkPhysicalTableInstance() at all. Instead of inserting records to tembdbvariable and then linking the temporary data with FormdatasourceName, you can simply insert records to FormdatasourceName. Then you delete records from FormdatasourceName and insert new ones.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 747 Super User 2025 Season 2

#2
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 743

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 528 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans