Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Monday, November 18, 2013

update_recordset , insert_recordset, Delete records and select record of SQL in Dynamic AX 2012


//Select query in Dynamic AX 2012
 MyTable myTableBuffer;
;
Select myTableBuffer
where field1 == 0;
//use while select for multiple select

// Update query in Dynamic AX 2012

MyTable myTableBuffer;
;
update_recordset myTableBuffer
setting
    field1 = 1,
    field2 = fieldX + fieldY
where field1 == 0;

//Delete query in Dynamic AX 2012
 
static void DeleteMultiRow1aJob(Args _args)
{
    MyWidgetTable tabWidget;
    ;
    delete_from tabWidget
        where tabWidget .quantity <= 100;
}
 

// Insert query in Dynamic AX 2012
insert_recordset myTable (Field1, Field2)
    Field1= “QWERTyuioP”
Field2 = “ASDFghjkl” ;
 


No comments:

Post a Comment

SQL code to upate one Legal entity banner to all the legal entity in D365

 Hi, update companyimage set  companyimage.Image  = companyimageA.Image  from  ( select Image from companyimage where dataAreaid = 'USF...