AX 2012 R3: Record should not be created in last position in grid

Hi All,

please find below requirement.

Requirement: I need to create a button in action pane of form. and form contains records. its a normal custom form. showRowLabels property of grid is set to No. once i click on button selected record should be copy on the same form.

Problem facing: I am able to copy the record on the same form. but that record insert on bottom position of grid. i want to insert record immediate after of selected record which i copied or above of selected record. because if there are 100 of records and user select 2nd record and click on copy button. record will insert at bottom of grid and user needs to be scrolldown.

please find  attached screenshot of my code of button click. any suggestion woul be appreciate.

void clicked()
{
   
    SYN_TransactionAllocation  _CopytransactionAllocation,copytotransact,refreshtransact;
    common recordtofind;
    int    position;

   // super();

    _CopytransactionAllocation = SYN_TransactionAllocation::findByRecId(SYN_TransactionAllocation.RecId);
    copytotransact.data(SYN_TransactionAllocation);

    copytotransact.insert();

    recordtofind = SYN_TransactionAllocation::findByRecId(copytotransact.RecId);
    SYN_TransactionAllocation_ds.research(true);
    SYN_TransactionAllocation_ds.refresh();
    SYN_TransactionAllocation_ds.findRecord(recordtofind);



}

Parents
No Data
Reply Children
Related
Recommended