The SysInfoAction class provides the ability to add an action to the standard infolog.
The user can then perform the action by clicking the infolog. The SysInfoAction class can be extended to perform custom actions e.g. opening a file using the default application.
Examples:
The example below uses the SysInfoAction_Formrun class and will open the "Accounts receivable parameters" form if the user clicks the infolog.
static void AV_TestSysInfoAction_FormRun(Args _args)
{
SysInfoAction_FormRun infoAction = SysInfoAction_FormRun::newFormName(formStr(CustParameters));
;
infoAction.parmDescription("Open parameters");
info("The parameters have not been entered.", "", infoAction);
}
The Infolog System can be easily customized in Dynamics AX. You can attach actions to the displayed messages in the infolog. Upon double clicking the message you can go to another form, related to the displayed message.
The Infolog System can be easily customized in Dynamics AX. You can attach actions to the displayed messages in the infolog. Upon double clicking the message you can go to another form, related to the displayed message.
Solution: use SysInfoAction_TableField class
Using the SysInfoAction_TableField class, you can easily add this functionality in your displayed messages. The job beneath shows you the example for this functionality. Double clicking will open the Customer form on the Customer determined in the X++ code. (Instead of double clicking, even you could click the Show button in the Infolog).
static void MainTableFromInfoMessage(Args _args)
{
CustTable ct;
args args = new args();
;
select ct
where ct.AccountNum == "1101";
{
args.record(ct);
info(strfmt("Customer account is: %1", ct.Name), "", Sysinfoaction_tablefield::newBuffer(ct));
}
}
Using the SysInfoAction_TableField class, you can easily add this functionality in your displayed messages. The job beneath shows you the example for this functionality. Double clicking will open the Customer form on the Customer determined in the X++ code. (Instead of double clicking, even you could click the Show button in the Infolog).
static void MainTableFromInfoMessage(Args _args)
{
CustTable ct;
args args = new args();
;
select ct
where ct.AccountNum == "1101";
{
args.record(ct);
info(strfmt("Customer account is: %1", ct.Name), "", Sysinfoaction_tablefield::newBuffer(ct));
}
}
No comments:
Post a Comment