web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / Behind AX / AXAPT - Change company with...

AXAPT - Change company with code

metin emre Profile Picture metin emre 502
It's easy to change company with code. But there are two small points to care; if select/SQL used, buffer table name should be make null at every reuse. IF query used query should be create again in every loop. Query.reset() doesn't work for clear query:


Query:

 changeCompany(dataArea.Id)
{
            qRun = new QueryRun(q);
            while (qRun.next())
            {
                    custTable = qRun.get(tablenum(CustTable));
...

}
}


Select/SQL:

        changeCompany(dataArea.Id)
        {
            custTable = null;
            subSegmentGroup = null;
            while select AccountNum from custTable

...



This was originally posted here.

Comments

*This post is locked for comments