AX 2012: crossCompany delete_from

Although we cannot use crossCompany keyword with delete_from command, we can still achieve the same functionality with some performance overhead as follows:

static void JobCCDel( Args _args )
    Table21 tab21a, tab21b;

    while select crossCompany minof(ratingNum), dataAreaId from tab21a
        group by dataAreaId
            tab21b = null;
            delete_from tab21b
                where tab21b.ratingNum == tab21a.ratingNum;

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s