AX – D365Fo – Call method of a calling record

    object          object;
    formDataSource  formDataSource;


// Call method from calling record
    if( element.args() &&
        element.args().record() )
    {
        common = element.args().record();
        if(common.isFormDataSource())
        {
            info(tableId2Name(common.TableId));
            if(formDataSourceHasMethod(common.dataSource(), identifierStr("someMethod")))
            {
                object = common.dataSource();
                object.someMethod();
            }
        }
    }

Leave a Reply

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

WordPress.com Logo

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

Facebook photo

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

Connecting to %s