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

Notifications

Announcements

Community site session details

Community site session details

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

Personalization view on custom control

(0) ShareShare
ReportReport
Posted on by 54
Hi,
 
In D365 FnO, users use a personalization view in a form.
There is a "Showing log" control that also displays log records.
I create a pesonalization view in the checked state, but If I apply the saved view, the marker does not change.
 
When creating a view
 
When in use
 
public void executeQuery()
{
    QueryBuildDataSource qbds = this.queryBuildDataSource();
    SysQuery::findOrCreateRange(qbds, fieldNum(ProcurementPlanLines, Log)).value(visibleLog ? SysQuery::valueUnlimited() : queryValue(NoYes::No));
    super();
}
 
Even though the Log row display is handled in ExecureQuery, it does not take this into log when activating the view.
Query:
SELECT FIRSTFAST FORUPDATE * FROM ProcurementPlanLines(ProcurementPlanLines) USING INDEX IndexIdx WHERE ((Log = 0)) 
In the saved view, "Showing log" was selected and it is not overwritten in ExecuteQuery.
How can these queries be handled?
 
Regards,
László
Categories:
I have the same question (0)
  • Suggested answer
    Diego Mancassola Profile Picture
    349 on at
    Hello, you have to add a little piece of logic to handle your custom control based on saved query.
     
    Check it on documentation, of custom filter section:
     
    public void queryFiltersChanged(): This new method is called when the query is rerun by the system after changes to the query (for example, when a view loads or a system filtering mechanism is used). Therefore, the custom filter control has an opportunity to interrogate the mostly recently run query to find any relevant filter and update its value so that it appropriately reflects that query.
     
    In that method you can update your check control status.
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    302,454 Super User 2025 Season 2 on at
    Hi László,
     
    The saved views is not capable of remembering values from unbound form controls. You can change details about control behavior and query values. The toggle state is not supported. 
     
    You can consider a customization to have this tickbox enabled by default.

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…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

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

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 437 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 305 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans