Vimal Axapta

Wednesday, 15 July 2015

update_recordset [AX 2012]

Example 1: Assigning from a Math Expression

MyTable myTableBuffer;
;
update_recordset myTableBuffer
setting field1 = field1 * 1.10;
Example 2: Using a Where Clause
MyTable myTableBuffer;
;
update_recordset myTableBuffer
setting
    field1 = 1,
    field2 = fieldX + fieldY
where field1 == 0;
Example 3: Joining Tables in an Update
static void Join22aJob(Args _args)
{
    TableEmployee tabEmpl;
    TableDepartment tabDept;
    TableProject tabProj;
    ;
    update_recordset tabEmpl
    setting
        currentStatusDescription = tabDept .DeptName
            + ", " + tabProj .ProjName
    join tabDept
        where tabDept .DeptId == tabEmpl .DeptId
    join tabProj
        where tabProj .ProjId == tabEmpl .ProjId;

    info(strFmt("Number of records updated is %1."
        ,tabEmpl .rowCount()));
}

Happy DAXing
.........
Posted by Vimal at 16:43
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

About Me

Vimal
View my complete profile

Blog Archive

  • ►  2021 (5)
    • ►  December (1)
    • ►  November (3)
    • ►  February (1)
  • ►  2020 (9)
    • ►  November (2)
    • ►  September (3)
    • ►  August (1)
    • ►  July (3)
  • ►  2019 (2)
    • ►  October (1)
    • ►  March (1)
  • ►  2017 (17)
    • ►  October (1)
    • ►  September (2)
    • ►  July (6)
    • ►  February (7)
    • ►  January (1)
  • ►  2016 (21)
    • ►  December (5)
    • ►  November (3)
    • ►  October (4)
    • ►  July (2)
    • ►  June (2)
    • ►  April (1)
    • ►  March (4)
  • ▼  2015 (36)
    • ►  December (1)
    • ►  October (5)
    • ►  September (1)
    • ▼  July (15)
      • Dynamics AX 2012 Workflow receives "Failed to find...
      • Forms not opening in local client.
      • You receive the error: “The transactions on vouche...
      • How to enable the setup for user specific font Set...
      • How to force complete CIL recreation in MS Dynamic...
      • Importing a General Journal using Data Import/Expo...
      • Dynamics AX Table Caching: Basic Rules
      • Customizing the system-generated query of the Invo...
      • X++ code to Count Records in Query
      • AOT Synchronization Errors (Troubleshooting )
      • Deploy the default reports [AX 2012]
      • Select Statement Examples [AX 2012]
      • delete_from [AX 2012]
      • insert_recordset [AX 2012]
      • update_recordset [AX 2012]
    • ►  June (4)
    • ►  May (1)
    • ►  April (3)
    • ►  March (6)
  • ►  2014 (24)
    • ►  December (24)
Picture Window theme. Theme images by MichaelJay. Powered by Blogger.