Hello,
If you get grey hairs when you battle obstacles, I am soon facing a snow white hair cut.
I'm battling an issue, that I can not seem to solve in Dynamics AX 2012.
I have a form using a view.
The view contains several datasources and it is using outer joins.
The form presents an overview of information, but also allows the user to update approval flags on the records shown in the form.
Thus when using these function, updates are made to the tables, that the view is using to show the overview, and thus
I need to refresh the form datasource, when the functionality is used.
This is the root of my problems.
The overview (and overview of hours consumption transactions for a given periode) can contain several 100's or maybe even 1000's of records, depending on the users filtering.
Therefor it is quite important for the user, that the cursor retains it's position or at least re-positions it self at the record, where it resided, when an update causing a research/refresh
was made.
However, as before mentioned the view uses outer joins, which is why
form_ds.research(true)
method will *not* work.
https://cloudblogs.microsoft.com/dynamics365/no-audience/2010/08/05/research-method-on-x-forms/
Also if I open my view in a table-browser, ALL rows have the same recid (1010).
Therefor I am attempting to use the construct:
int position;
position = Form_ds.getposition();
Form_ds.research();
Form_ds.setPosition();
It works *sometimes*.
If the cursor is situated at say position 12, the repositioning of the cursor works.
However placing the cursor on say the 73rd record in the overview, the getPosition / setPosition mechanism does not work,
and the cursor goes to the top of the overview, frustrating me and the users.
Have anyone experienced the same problem, and maybe found a solution ?
Regards
Jacob
*This post is locked for comments
I have the same question (0)

Report
All responses (
Answers (