2023年2月

单选

  • 普通Lookup

     public Lookup(){
         Query                           query = new Query();
         QueryBuildDataSource            queryBuildDataSource;
         QueryBuildRange                 queryBuildRange;
         HRMAbsenceCode                  HRMAbsenceCode ;
    
         SysTableLookup                  sysTableLookup =
         SysTableLookup::newParameters(tableNum(HRMAbsenceCode), sender);
         sysTableLookup.addLookupField(fieldNum(HRMAbsenceCode,DESCRIPTION),true);
         sysTableLookup.addSelectionfield(fieldNum(HRMAbsenceCode,RecId)  );
    
         queryBuildDataSource = query.addDataSource(tableNum(HRMAbsenceCode));
         queryBuildDataSource.addRange(fieldNum(HRMAbsenceCode, LinkWithBenefitAccural)).value((any2Str(NoYes::yes)));
         sysTableLookup.parmQuery(query);
         sysTableLookup.performFormLookup();
      }
    

多选

  • normal

       public Lookup(){
          Query query = new Query();
          QueryBuildDataSource    qbds     = query.addDataSource(tablenum(tb));
          qbds.fields().addField(fieldNum(tb, field));
          container selectedFields = [tableNum(tb), fieldNum(tb, field)];
          SysLookupMultiSelectCtrl::constructWithQuery(this, VoucherList, query, true,    selectedFields);
      }
    

tips:

  • EventHandler 取消原窗体调用:

     FormControlCancelableSuperEventArgs cancelSuperEventArgs = e as FormControlCancelableSuperEventArgs;
     cancelSuperEventArgs.CancelSuperCall();
  • 临时表

     sysTableLookup.parmQuery(query);
     sysTableLookup.parmTmpBuffer(TmpTableFieldLookup);
     sysTableLookup.performFormLookup();
    

  • 添加管理权限工具

     C:\AOSService\PackagesLocalDirectory\bin\AdminUserProvisioning.exe
    
  • 表浏览器

     https://usnconeboxax1aos.cloud.onebox.dynamics.com/?cmp=xxxx&mi=systablebrowser&tablename=TableName
    
  • 调试进程

     wpw4 或 wpw3
    
  • 生成编码

     系统管理-定期任务-生成模块序列编号
    

-- using (SysErrorMessageHelpScope scope = SysErrorMessageHelpScope::newErrorContext(_args))

{
}

Danzel2020-11-26AX2012328 浏览
GeneralJournalAccountEntry.LedgerDimension = DimensionAttributeLevelValueAllView.ValueCombinationRecId
DimensionAttributeLevelValueAllView.DimensionAttribute = DimensionAttribute.RecId

DimensionAttributeLevelValueAllView中会把不同的维度展开成数行,结合DimensionAttribute表可以获取指定维度数据

copy from http://maryd.cn/?id=139