Wednesday, November 14, 2012

Retrieve multiple selected records from Grid using X++. in AX dynamics 2012


Retrieve all selected records of a datasource in a Grid

    int             recordsCount;
    Student     studentLocal;
    super();
    
    recordsCount = student_ds.recordsMarked().lastIndex();  // Total no of marked records.
    studentLocal = student_ds.getFirst(1);
    
    while (studentLocal)
    {
        info(studentLocal.Name +" " +studentLocal.ID);
        studentLocal = student_ds.getNext();
    }

1 comment:

  1. Sir Can you please elaborate about Table dataSource name Tb_Ds how can we set or get this thanks

    ReplyDelete