How to go to the object from Infolog

How to go to the object from Infolog

When we print a transaction id through infolog Usually, it is more useful if the user can go directly to the object from an Infolog line.

For example, we need to see all the BOM without any active version. By the way, this is a good example, too, for what we cannot do by means of Advanced Filter but quickly by coding a short job.

static void SIBOMwithNoActiveVersion(Args _args)
    BOMTable    bomTable;
    BOMVersion  bomVersion;
    int         nmbr, i;
    boolean     printOnly = false;

    SetPrefix('BOMs without any active version');
    Nmbr = 0;

    while select bomTable
    notexists join bomVersion
    where bomVersion.Active == NoYes::Yes
    && bomVersion.BOMId == bomTable.BOMId
        info(strfmt("%1 %2, %3, %4, %5, %6, %7",
        SysInfoAction_TableField::newBufferField(bomTable, fieldnum(bomTable, BOMId)));



Now the user can opt for Show from the context menu or just double-click on the interesting line to open the related form.



Popular posts from this blog

Connecting to Databases through X++ PART -I

X++ code for document attachment

Multiple Tables In Query