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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested Answer

Main View Form not refreshing in Production Floor Execution

(1) ShareShare
ReportReport
Posted on by 23
In production floor execution, I added a new main view that will open a custom form. I did this by following this https://learn.microsoft.com/en-us/dynamics365/supply-chain/supply-chain-dev/production-floor-execution-customize. In the custom form, I need to filter data based on productionid selected in the All Jobs tab. When I select a record in AllJobs, the productionid gets added to a custom config table. When I deselect it gets removed from config table.
Then when I open up the custom form data should be filtered based on productionid in config table. When I open pfe, and select a record and then open the custom form it is being filtered. But when I go back and select another record, the filter is not happening again. The data is being showed from the first selection only. The form is not being refreshed I think? I tried adding refresh logic in init and run method of the form but it is not working. The init and run method is running only once. Is it because it is a tab? How do I refresh a tab that shows a form? Any other reason the form is not refreshing? How does it work in pfe?
I have the same question (0)
  • Suggested answer
    Saalim Ansari Profile Picture
    666 on at

    Hi Yash,
     

    Your form's init() and run() methods only execute once — when the form is first initialized, not on tab switching. PFE loads each tab (main view) only once, for performance reasons.

     

    This means:

    Switching records in AllJobs doesn't reload or refresh your tab/form. 

    Your custom form must listen or respond to an external trigger/event to re-query its data

     

    You need to override the active() method or create a custom refresh mechanism, possibly via a custom controller or using the form’s datasource.executeQuery() call based on changes to the config table.

  • Yash Nemkul Profile Picture
    23 on at
    Thanks for the reply Saalim.
    I tried using the executequery method on the forms datasource but it was still not working. It works if you open a form from a menu item but through tab switch, not working. If possible, could you provide a sample or example on how could we create a custom refresh mechanism or any other way? Also the form only has activate method, but datasoirce does have active method, should I use that one?
  • Zain Mehmood Profile Picture
    4,187 Most Valuable Professional on at
    Moved to SCM 

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Laurens vd Tang Profile Picture

Laurens vd Tang 298 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 179 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

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

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans