InventTable inventTableBuffer;
for (inventTableBuffer = getFirstSelection(InventTable_ds);
inventTableBuffer;
inventTableBuffer = InventTable_ds.getNext())
{
// write logic here.
}
new MenuFunction(menuItemDisplayStr(MyDisplayMenuItem), MenuItemType::Display).run();
new MenuFunction(menuItemOutputStr(MyOutputMenuItem), MenuItemType::Output).run();
Args args = new Args();
args.record(myArgumentRecord);
args.caller(this);
new MenuFunction(menuItemOutputStr(NameOfOutputMenuItem), MenuItemType::Output).run(args);
select top 1 name from DIRPARTYTABLE inner join HcmWorker ON HcmWorker.PERSON = DIRPARTYTABLE.RECID AND HcmWorker.RECID = (select top 1 worker from HCMPOSITIONWORKERASSIGNMENT INNER JOIN HCMPOSITION ON HCMPOSITIONWORKERASSIGNMENT.POSITION = HCMPOSITION.RECID AND HCMPOSITION.POSITIONID = 'PositionId' where GETDATE() between HCMPOSITIONWORKERASSIGNMENT.VALIDFROM AND HCMPOSITIONWORKERASSIGNMENT.VALIDTO);
1: [ExtensionOf(tableStr(Table1))]
2: final class Table1_Extension
3: {
4: public void insert()
5: {
6: this.fieldName = “to insert”; //update field before insert method is executed
7: next insert();
8: this.fieldName = “to insert”; //update field after insert method is executed
9: }
10: public void delete()
11: {
12: //logic before delete method is executed
13: next delete();
14: //logic before after method is executed
15: }
16: public void update(anytype _parameters)
17: {
18: //logic before update method is executed
19: next update(_parameters);
20: //logic after update method is executed
21: }
22: }
Starting in version 10.0.10 Platform update 34, you can use the Message::AddAction() method to embed an action within a message. This will help user to navigate through error on the form to update the data.
Example:
class TestJob_MenuAction
{
/// <summary>
/// Runs the class with the specified arguments.
/// </summary>
/// <param name = "_args">The specified arguments.</param>
public static void main(Args _args)
{
MenuItemMessageAction actionData = new MenuItemMessageAction();
actionData.MenuItemName(menuItemDisplayStr(Inventsite));
str jsonData = FormJsonSerializer::serializeClass(actionData);
Message::AddAction(MessageSeverity::Error, "Site information required.", 'Site Master.',
MessageActionType::DisplayMenuItem, jsonData);
}
}
Output:
On click of Site Master, InventSite form will be opened.
Currency details:CompanyInfo companyInfo = CompanyInfo::find(); info(strFmt("%1",companyInfo.postalAddress().Address));
CompanyInfo::standardCurrency() OR Ledger::accountingCurrency(CompanyInfo::current());
To deploy reports using windows powershell, run Windows PowerShell as admin and use following commands :
To deploy all reports:
K:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\DeployAllReportsToSSRS.ps1 -PackageInstallLocation “K:\AosService\PackagesLocalDirectory”
To deploy a specific report:
K:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\DeployAllReportsToSSRS.ps1 -Module _SpecifyModuleName_ -ReportName _SpecifyReportName_ -PackageInstallLocation "K:\AosService\PackagesLocalDirectory"throw error("Customer not found");
throw infolog.add(Exception::Error, "Customer not found");
To loop/iterate selected records from grid on form you can use following code, this can be done on clicked method of button control : Invent...