AX – D365FO – Call mehod from calling record data source

Somethime it can happen tha you have to call a methode of a calling object

This code explains how to do it

common          common;
object          object;

// Call method from calling record
    if( element.args() &&
        element.args().record() )
        common = element.args().record();
            if(formDataSourceHasMethod(common.dataSource(), identifierStr("someMethod")))
                object = common.dataSource();

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 )

Facebook photo

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

Connecting to %s