Hi all,
i have a list page that shows a table. on this page i have an action for creating new records. This action runs a function in a codeunit which finally creates the new record. The problem is that the records which are created from the codeunit will not be displayed on the page. Even Refreshing (F5) doesn't help. The only thing that helps is closing the page and open it up again.
i even tried to add
SELECTLATESTVERSION;
CurrPage.UPDATE(FALSE);
but it has no effect. Does anyone know a solution for that problem?
Step by Step:
1. open the page
2. Click the action
3. Codeunit Function get's called
4. Record is created but not shown
5. Refresh doesn't help
6. the code up doesn't help
7. Closing the page
8. Open the page again
9. Record is shown
Thanks a lot for your help,
Marc
Comments
My guess is, that your Action somehow sets a filter on the current Rec, and after that the records are inserted, but do not match the filter criteria.
Looking for rec.setrange, ... might help you find the issue.
@Wisa123 You are right after i checked that i found a line at the end of the function where it goes back to the page with VAR Record
I changed it now to
and now it works like expected. Thanks a lot for your help. I was really looking for a long time about this issue. Thanks