Description:-
The xRecord .insert method generates values for RecId and system fields, and then inserts the contents of the buffer into the database.
The method operated as follows:
To override the behavior of the insert method, use the doInsert method.
Create Job from AOT
The xRecord .insert method generates values for RecId and system fields, and then inserts the contents of the buffer into the database.
The method operated as follows:
- Only the specified columns of those rows selected by the query are inserted into the named table.
- The columns of the table being copied from and those of the table being copied to must be type compatible.
- If the columns of both tables match in type and order, the column-list may be omitted from the insert clause.
To override the behavior of the insert method, use the doInsert method.
Create Job from AOT
- In the AOT, click Job.
- Right-click the Job node, and then select New Job.
Step 1: Now Create Job And Run to Insert Record in A_Studnet
Table.
Code:-
static void InsertMethod(Args _args) { A_Student _Student; // Initialize the table variable _Student.initValue(); // Write some values to the table variable _Student.Student_ID = "CT_017"; _Student.Student_Name = "JagPratap"; _Student.CustAccount = '1120'; // Check if all values are legal and if so, // insert the values of the table variable into a record in the table if (_Student.validateWrite()) { _Student.insert(); info(strFmt("Student ID - %1 Has Been Inserted",_Student.Student_ID)); } else { info(strFmt("Student ID - %1 Has Already Been Inserted",_Student.Student_ID)); } }
Thanks for comments.....