Insert record at a position from code

HenkeHenke Member Posts: 6
edited 2006-05-11 in Dynamics AX
Hi
When I manually add a record in a table it get positioned where the cursor is located, but when I add it from code (with custTable.insert()) it is added at the end of the table.
Is it possible to force Axapta to insert a record at a position from code?

Thanks in advance!

Comments

  • MugurMugur Member Posts: 93
    Hi,

    Your statement about creating manually is only an apearance. The record is created at that position in the current state of the form. If a filter/execute query is run, the record changes it's position usually to the last. For e.g. try closing the form and reopening.

    The position of records in a form is determined by the index used. If no primary index the records are displayed in the recid order. If you want to sort according to another index (not primary/recid), you need to set the Index property from the form datasource.
    Kind regards,

    Ciprian Dudau
    Axapta Developer
Sign In or Register to comment.