Thursday, November 7, 2024

update_recordset with joins

 update_recordset with joins

update_recordSet storeTransfer    

    setting 

    TransactionId = transfertable.TransferId

    join transfertable

    where transfertable.VoucherId == storeTransfer.DocumentNo

    && transfertable.UpdateType == InventTransferUpdateType::Receive;

Thursday, September 15, 2022

Enable/Disable form control based on multiple rows select

 class PurchTableFormEventHandler

{

     [FormDataSourceEventHandler(formDataSourceStr(PurchTable, PurchTable), FormDataSourceEventType::Activated)]

    public static void PurchTable_OnActivated(FormDataSource sender, FormDataSourceEventArgs e)

    {

        FormRun             formRun = sender.formRun();

        FormRun             element       = sender.formRun(); 

        FormControl         yourcontroller = element.design(0).controlName("yourcontrollerName");       

        FormDataSource  PurchTable_ds = formRun.dataSource(formDataSourceStr(PurchTable, PurchTable));

        PurchTable PurchTable ;

        PurchTable = PurchTable_ds.getFirst(true) ? PurchTable_ds.getFirst(true) : PurchTable_ds.cursor();

      

        while(purchTable)

        {

            if(purchTable.DocumentState == VersioningDocumentState::Confirmed &&

                purchTable.PurchStatus != PurchStatus::Canceled)

            {

                 yourcontrollerName.enabled(true); 

            }

            else

            {

                yourcontrollerName.enabled(false);

                break;

            }

            purchTable = PurchTable_ds.getNext() as PurchTable;

        }        

    }

}

Friday, June 10, 2022

Validate Number's in String column

public boolean validateHSN()

{

    boolean ret = true;

    int     i = strLen(this.HSNCode);

    TextBuffer txt = new TextBuffer();

    str msg = this.HSNCode;


    txt.setText(msg);

    txt.regularExpressions(true);


    if (ret)

    {

        if (i == 4 || i == 6 || i == 8)

        {

            ret = true;

        }

        else

        {

            ret = checkFailed("Enter 4 0r 6 or 8 digits only");

        }

    }

     if (ret)

    {

        if (txt.find("^[0-9]+$"))

        {

            ret = true;

        }

        else

        {

            ret = checkFailed("Enter only numbers");

        }

    }

    return ret;

}

Tuesday, December 28, 2021

Refresh form datasource from Class

 Auto Refresh form after uploaded data 

in Class main method 

static client void main(Args   _args)

{

YourClassName          testclass;

FormDataSource     callerds; 

;

testclass = new  YourClassName();

if(_args && _args.record() && _args.record().isFormDataSource())

{

    callerds = _args.record().DataSource();

}

    testclass.run();


//Refresh form DS

callerds.research();

}






Friday, November 26, 2021

get selected record from Lookup



based on selected record from parent code lookup modify item id in purchase order.

create a new custom lookup form as shown below.


override closeselect   method :

Public void closeselect(str  _selectString)
{
FormRun      formrun;
Object          formrunobj;

     super(_selectString);

if(element.args() != null
    && element.args().caller() != null
   && SysDictClass::is(element.args().caller(),classnum(FormRun ))
    {
        formrun = element.args().caller();
        if(formHasMethod(formrun,identifierstr(PurchTable)))
        {
          formrunobj = formrun;
        }
}

}

override init method :

set  Autodeclaration Yes Highlited control in 

Public void int()
{
    super();
    element.selectMode(InventTable_ParentCode);
}

override runmethod :

Public void run()
{
    FormStringControl         callingcontrol;
    boolean                           filterlookup;
    FormRun                        formrun;
        
   if(element.args()  && element.args().caller())
    {
        if(SysDictClass::is(element.args().caller(),classnum(FormRun )))
        {
            formrun =  element.args().caller();
        }
    super();
    
}

call Lookup form in ParentCode control level in PurchTable form.

Public void lookup()
{
      Args       args = new Args();
     FormRun      lookupform;
    InventTable       inventTable;

    args.name(formstr(parentlookup));
    args.parm(PurchLine.ItemId);

    lookupform = new FormRun(args);
    lookupform .init();
    this.performFormLookup(lookupform);
    lookupform.wait();

    if(lookupform.closeOk())
    {
        inventTable = lookupform.docCursor();
    }

}

Get RecId from inventTable modify ItemId from modified method.

Wednesday, August 18, 2021

ComboBox filter

1. Add Enum control in Form

2 .Enum Contol AutoDeclaration property set to Yes. 

3 .in control modified method add below code.

public boolean modified()

{

     int                                ret;

    QueryBuildRange       range;

    ;

    ret = super();

    range = SysQuery::findOrCreateRange(
        purchTable_DS.query().dataSourceTable(tablenum(PurchTable)),
        fieldnum(PurchTable, PurchStatus));
    range.value(queryValue(controlname.selection()));
    purchTable_DS.executeQuery();

    return ret;
}

Friday, June 18, 2021

Some Important function

 Get Last Two Characters

Str     s = 'AXAPTA';

info(strfmt( subStr(s,strLen(s)-1,strlen(s)));

OutPut : TA

Get First Two Characters

info(strFmt(subStr(s,0,2 )));

OutPut : AX

Friday, December 4, 2020

Validate in UI Builder class

 Write below code in your UIBuilder Class

public boolean validatePostingProfile(FormStringControl  _control)

{

    boolean        ret = true;

   VendPostingProfile    vendPostingProfile;

    vendPostingProfile  = _control.valueStr();  

    if(VendLedger::find(vendPostingProfile))

    {

        if(vendPostingProfile != ' ' )

        {

        error ('Posting profile does not exist');

        ret = false;

    }

    return ret;

}


call the above method in PostBuild  method


dlgpostingProfile.registerOverrideMethod(methodStr(FormStringControl, validate), methodStr(<yourUIBuilderclass>, validatePostingProfile),this);

Tuesday, November 17, 2020

Validation on Empty space through X++

 Tables-->InventBatch-->ValidateField

 case fieldNum (InventBatch,InventBatchId):

if(strContains(this.InventBatchId," "))

{

      ret = checkFailed("Empty space is not Allowed");

}

Tuesday, May 5, 2020

SSRS Expression

Add total on Group by :

=SUM(MAX(Fields!RoundOff.Value,"LedgerVoucher"))

here LedgerVoucher is group name


Serial number on Group by :

syntax:

=RunningValue(<Grouped field>,CountDistinct,”<DataSet>”)

Example:

=RunningValue(Fields!LedgerVoucher.Value,CountDistinct,"SendingBillsDS")

Date Format : Monthname - year 

=FORMAT(Fields!ExpDate.Value, "MMM-yy")

Ex: Jan-23

Wednesday, March 4, 2020

call table level lookup method in form

EmplTable-->Method
 public client static void lookupActiveEmpId(FormStringControl _ctrl)
{
    SysTableLookup          sysTableLookup =      SysTableLookup::newParameters(tableNum(EmplTable),_ctrl);
    Query                   query = new Query();
    QueryBuildDataSource    queryBuildDataSource = query.addDataSource(tableNum(EmplTable));

    queryBuildDataSource.addRange(fieldNum(EmplTable,Active)).value(enum2str(NoYes::Yes));
    sysTableLookup.addLookupfield(fieldNum(EmplTable,EmplId));
    sysTableLookup.addLookupfield(fieldNum(EmplTable, EmplName));
    sysTableLookup.addLookupfield(fieldNum(EmplTable,Active));
    sysTableLookup.addSelectionField(fieldNum(EmplTable,EmplId));

    sysTableLookup.parmQuery(query);
    sysTableLookup.performFormLookup();
}
Form-->Design String Control-->method

public void lookup()
{   
    EmplTable::lookupActiveEmpId(this);
}

Monday, February 24, 2020

Passing ranges in Query through X++

Not equal to Enum Value :

qbr = qbds1.addRange(fieldNum(InventTransferTable,       TransferStatus)).value(SysQuery::valueNot(InventTransferStatus::Created));
Passing NOT equal multiple Enum values:

this.query().dataSourceTable(tablenum(PurchTable)).addRange(fieldnum(PurchTable, PurchStatus)).value(strfmt('!%1,!%2',enum2str(PurchStatus::Canceled),enum2str(PurchStatus::Invoiced)));

qbds.addRange(fieldNum(InventSite, SiteId)).value(strFmt("%1,%2",strFmt('!%1*','*_VF*'),strFmt('!%1*','*_VP*')));
      

LessThan:

qbr3 = qbds.addRange(fieldNum(CustTrans,TransDate)).value(strFmt('<%1',queryValue(asondate)));

Not Equal to 0 (Zero) :


qbds.addRange(fieldNum(CustTrans,AmountCur)).value('!0');



LessThan zero:

 qbr5 = qbds2.addRange(fieldNum(VendInvoiceJour, InvoiceAmount));
 qbr5.value(strFmt('<%1',queryValue(0)));

Not Equal to Null Values:

qbdsBankAccountTrans.addRange(fieldNum(BankAccountTrans,ChequeNum)).value(sysquery::valueNotEmptyString());
    
AND operator

qbds1.addRange(fieldNum(GeneralJournalEntry,JournalTransactionType)).value(strFmt('%1,%2',enum2str(JournalTransactionType::StockTransfer),enum2str(JournalTransactionType::StockTransferOut)));


Not equal 100:

qbds.addRange(fieldnum(VendTable,accountnum)).value(sysquery::valueNot(“100”));

pass Between Ranges:

qbds.addRange(fieldnum(VendTable,accountnum)).value(queryrange(“1″,”100”));


between two fields :

 qbr1 = queryBuildDataSource.addRange(FieldNum(CustTrans,RecId));
    qbr1.value(strFmt('((%1 < %2))',fieldStr(CustTrans, AmountCur),fieldStr(CustTrans, AmountMST)));

 Enum Values

qbds.addRange(fieldNum(InventSite, RunningOn)).value(strFmt('((%1 == %2) || (%1 == %3))', fieldStr(InventSite,RunningOn),any2int(SiteRunningOn::AX),any2int(SiteRunningOn::GOLD)));



Tuesday, January 29, 2019

Create Dialog in D365

class simpledialog extends RunBaseBatch
{
    DialogField     fieldfromDate;
    DialogField     fieldtoDate;

    TransDate       fromDate,toDate;   

    #DEFINE.CurrentVersion(1)
    #LOCALMACRO.CurrentList
        fromDate,toDate
    #ENDMACRO



    // pack() and unpack() methods are used to load the last value from user
    public container pack()
    {
    return [#CurrentVersion,#CurrentList];
    }

    public boolean unpack(container _packedClass)
    {
    int version = conpeek(_packedClass, 1);

    switch (version)
    {
        case #CurrentVersion:
            [version,#CurrentList] = _packedClass;
            break;
        default :
            return false;
    }

    return true;
}

    public Object dialog()
    {
        Dialog dialog;
        dialog = super();

        // Set a title for dialog
        dialog.caption( 'Purchase Order creation for Out Grower');

        // Add a new field to Dialog
        fieldfromDate = dialog.addField(extendedTypeStr(TransDate), 'From Date');
        fieldtoDate   = dialog.addField(extendedTypeStr(TransDate), 'To Date');

        return dialog;
    }

    boolean validate(Object _calledFrom = null)
    {
        boolean ret;

        ret = super(_calledFrom);
     
        if(fromDate > toDate)
         {
            ret = checkFailed('To Date should be greater than From Date') && ret;
         }
     
        return ret;
    }

    public TransDate parmfromDate(TransDate _fromdate = fromDate)
    {
    fromDate = _fromdate;

    return fromDate;
    }

    public TransDate parmtoDate(TransDate _todate = toDate)
    {
    toDate = _todate;

    return toDate;
    }

    public boolean getFromDialog()
    {
        fromDate = fieldfromDate.value();
        toDate = fieldtoDate.value();     

        return super();
    }

    public void run()
    {
       //your Logic 
    }

    public static void main(Args _args)
    {
        simpledialog   simple = new  simpledialog ();

        // Prompt the dialog, if user clicks OK it returns true
        if (simple .prompt())
        {
            simple .run();
        }
    }

   }

Thursday, January 24, 2019

Individual financial dimension value through X++

display DimensionValue displayLocDimension()
{ 
    VendTable                                          vendTable;
    DimensionAttributeValueSet             dimensionAttributeValueSet;
    DimensionAttributeValueSetItem      dimensionAttributeValueSetItem;
    DimensionAttributeValue                  dimensionAttributeValue;
    DimensionAttribute                          dimensionAttribute;
   VendTrans                                          vendtrans
    DimensionValue                               location;

      select * from vendTable
                           where vendTable.AccountNum == "XXXX"
            join RecId from dimensionAttributeValueSet
                          where dimensionAttributeValueSet.RecId == vendtrans.DefaultDimension
            join RecId, DisplayValue from dimensionAttributeValueSetItem
                          where dimensionAttributeValueSetItem.DimensionAttributeValueSet == dimensionAttributeValueSet.RecId
            join RecId from dimensionAttributeValue
                        where dimensionAttributeValue.RecId == dimensionAttributeValueSetItem.DimensionAttributeValue
            join RecId, Name from DimensionAttribute
                       where dimensionAttribute.RecId == dimensionAttributeValue.DimensionAttribute
                       && dimensionAttribute.Name == "LOCATION";
            {
                location = DimensionAttributeValueSetItem.DisplayValue;
            }
                return location;
  }

Thursday, September 13, 2018

userwise security roles

static void userSecurityExcelDocumentnew(Args _args)
{
    SysExcelWorksheetHelper     worksheetHelper;
    SysExcelHelper              sysExcelHelper;
    SysExcelWorkSheet           xlsWorkSheet;
    dialogField                 dialogFilename;
    Dialog                      dialog;
    SecurityUserRole            _SecurityUserRole;
    SecurityRoleTaskGrant       _SecurityRoleTaskGrant;
    SecurityTask                _SecurityTask;
    SecurityRole                _SecurityRole;
    UserInfo                    _UserInfo;
    SysUserInfo                 _sysUserInfo;
    FilenameOpen                filename;
    str                         worksheetName;
    int                         row = 1;
    SysOperationProgress Progressbar = new SysOperationProgress();
    #Excel
    ;
    startLengthyOperation();
    dialog              =   new Dialog("Excel Upoad");
   dialogFilename      =   dialog.addField(extendedTypeStr(FilenameOpen));
   dialog.filenameLookupFilter(["@SYS28576",#XLS,"@SYS28576",#XLSX]);
   dialog.filenameLookupTitle("Export to Excel");
   dialog.caption("User Security details");
   dialogFilename.value(filename);
   if(!dialog.run())
   return;
   filename            =   dialogFilename.value();

    worksheetName = strfmt("%1", date2str(systemdateget(),321,DateDay::Digits2,DateSeparator::None,DateMonth::Digits2,DateSeparator::None,DateYear::Digits4, DateFlags::None));
    sysExcelHelper = SysExcelHelper::construct();
    sysExcelHelper.initialize();
    xlsWorkSheet = sysExcelHelper.addWorksheet(worksheetName);

    worksheetHelper = SysExcelWorksheetHelper::construct(xlsWorkSheet);

     worksheetHelper.addColumn(1, 'User Id', Types::String);
     worksheetHelper.addColumn(2, 'User Name', Types::String);
     worksheetHelper.addColumn(3, 'User Role', Types::String);
     worksheetHelper.addColumn(4, 'Department', Types::String);
     worksheetHelper.addColumn(5, 'Active', Types::String);
     worksheetHelper.addColumn(6, 'Legal Entity', Types::String);
     worksheetHelper.addColumn(7, 'Created Date Time', Types::Date);
     worksheetHelper.addColumn(8, 'Modified Date Time', Types::Date);

     worksheetHelper.setCellValue(1, row,'User Id');
     worksheetHelper.setCellValue(2, row,'User Name');
     worksheetHelper.setCellValue(3, row,'User Role');
     worksheetHelper.setCellValue(4, row,'Department');
     worksheetHelper.setCellValue(5, row,'Active');
     worksheetHelper.setCellValue(6, row,'Legal Entity');
     worksheetHelper.setCellValue(7, row,'Created Date Time');
     worksheetHelper.setCellValue(8, row,'Modified Date Time');

    row++;
    while select _UserInfo
    {
        select _sysUserInfo where _sysUserInfo.Id == _UserInfo.id;
        while select _SecurityUserRole where _SecurityUserRole.User==_UserInfo.id
        {
                while select _SecurityRole where _SecurityRole.RecId==_SecurityUserRole.SecurityRole
                {
                    worksheetHelper.setCellValue(1, row,_UserInfo.id);
                    worksheetHelper.setCellValue(2, row,_UserInfo.name);
                    worksheetHelper.setCellValue(3, row,_SecurityRole.name);
                    worksheetHelper.setCellValue(4, row,_sysUserInfo.departmentName());
                    worksheetHelper.setCellValue(5, row,_UserInfo.enable);
                    worksheetHelper.setCellValue(6, row,_UserInfo.company);
                    worksheetHelper.setCellValue(7, row,_sysUserInfo.createdDateTime);
                    worksheetHelper.setCellValue(8, row,_sysUserInfo.modifiedDateTime);

                row++;
                }
        }
    }

    if(WinApi::fileExists(fileName))
    WinApi::deleteFile(fileName);

    sysExcelHelper.save(filename);
    sysExcelHelper.close();

    info(strFmt("Created file: %1", fileName));
}

Tuesday, June 26, 2018

staging to target mapping is not done

Error : staging to target mapping is not done

Solution :
static void regenerateDMFTargetMapping(Args _args)
{
    DMFTargetXMLToEntityMap     dmfTargetXMLToEntityMap;
    DMFEntity                                   dmfEntity;

    // delete all target Mappings
    ttsBegin;
        delete_from dmfTargetXMLToEntityMap;
    ttsCommit;

    // Regenerate Target Mapping for all Entities
    while select dmfEntity
    {
        DMFTargetXMLToEntityMap::generateMapping(dmfEntity);
    } 
    info("All Done!");

}

Note : Above job will run for all entities. If you want run only particular one entity add where condition in Regenerate Target Mapping.

Thursday, February 8, 2018

How to fix Suspended Values in Financial Dimensions lookup in Customer ,vendor....etc.


Forms >DimensionDefaultingLookup >Methods>init

  //Add below code++
        qbds =  queryBuildDataSource.addDataSource(tableNum(DimensionAttributeValue));
        qbds.relations(true);
        qbds.joinMode(JoinMode::InnerJoin);
        qbds.fetchMode(QueryFetchMode::One2One);
        qbds.addLink(dimAttrViewContract.parmKeyFieldId(),fieldNum(DimensionAttributeValue,EntityInstance));
        qbds.addRange(fieldNum(DimensionAttributeValue,DimensionAttribute)).value(strFmt("%1",dimAttr.RecId));
        qbds.addRange(fieldNum(DimensionAttributeValue,IsSuspended)).value(SysQuery::value(NoYes::No));

        ledger = Ledger::findByLegalEntity(CompanyInfo::find().RecId).RecId;

        qbdsLedger = qbds.addDataSource(tableNum(DimensionAttrValueLedgerOverride));
        qbdsLedger.joinMode(JoinMode::NoExistsJoin);
        qbdsLedger.fetchMode(QueryFetchMode::One2One);
        qbdsLedger.addLink(fieldNum(DimensionAttributeValue,RecId),fieldNum(DimensionAttrValueLedgerOverride,DimensionAttributeValue));
        qbdsLedger.addRange(fieldNum(DimensionAttrValueLedgerOverride,Ledger)).value(strFmt("%1",ledger));
        qbdsLedger.addRange(fieldNum(DimensionAttrValueLedgerOverride,IsSuspended)).value(SysQuery::value(NoYes::Yes));
        //Add below code--

Reference:

https://community.dynamics.com/ax/b/meritmatters/archive/2016/01/28/financial-dimensions-lookup

Saturday, September 9, 2017

How to run a Report through X++ code and save to PDF format

static void autoSave_PDF_SSRSSalesInoive(Args _args)
{
    Dialog                                    dialog;
    DialogField                          fromDate, toDate, invoiceId, folderPath;
    CustInvoiceJour                  custInvoiceJourLocal;
    FilePath                              filePath, slash = @"\";
    Filename                            fileName;
    Args                                   args = new Args();
    boolean                             folderexists,fileExists;
    str                                      idstr;
    int                 poss;
    SrsReportRunController              ssrsController = new SrsReportRunController();
    InvoiceContract                           salesConfirmContract = new InvoiceContract();
    SRSPrintDestinationSettings      printerSettings;  
    ;
    dialog = new Dialog("Sales Invoices save to PDF");
    fromDate = dialog.addField(extendedTypeStr(TransDate), "Select From Date");
    toDate = dialog.addField(extendedTypeStr(TransDate), "Select To Date");
    if(dialog.run())
    {
        if(curUserId() == "userid")
            filePath = @"C:\Users\userid\Desktop\Invoices\" + strFmt("%1%2%3",fromDate.value(), " To ", toDate.value()) + slash;
        else
            filePath = @"C:\JB\" + strFmt("%1%2%3",fromDate.value(), " To ", toDate.value()) + slash;
        while(poss < strLen(filePath))
        {
            poss = strFind(filePath, "/", poss, strLen(filePath));
            filePath = strPoke(filePath, "-", poss);
            if(!poss)
                break;
        }
        folderexists = WinAPI::folderExists(filePath);
        if(!folderexists)
            WinAPI::createDirectoryPath(filePath);
         while select custInvoiceJourLocal where custInvoiceJourLocal.InvoiceDate >=     fromDate.value() && custInvoiceJourLocal.InvoiceDate <= toDate.value()
              {
            fileName = filePath + strFmt("%1%2%3%4%5",custInvoiceJourLocal.PrintMgmtSiteId + "_",custInvoiceJourLocal.InvoiceId, "_" , custInvoiceJourLocal.InvoiceDate, ".pdf");
            while(poss < strLen(fileName))
            {
                poss = strFind(fileName, "/", poss, strLen(fileName));
                fileName = strPoke(fileName, "-", poss);
                if(!poss)
                    break;
            }
            fileExists = System.IO.File::Exists(fileName);
            if(!fileExists)
            {
                ssrsController.parmReportName(ssrsReportStr(SalesInvoice, Report));
                   //define how we want to execute the report (right now or batch style)
                ssrsController.parmExecutionMode(SysOperationExecutionMode::Synchronous);
                //hide the report dialog
                ssrsController.parmShowDialog(false);

                //we need to populate the required parms for the current sales order controller
                salesConfirmContract.parmInvoiceId(custInvoiceJourLocal.InvoiceId);
                salesConfirmContract.parmInvoiceDate(custInvoiceJourLocal.InvoiceDate);
                salesConfirmContract.parmSalesId(custInvoiceJourLocal.SalesId);
 
                //link the contract to the controller so we know how to run the dp
                ssrsController.parmReportContract().parmRdpContract(salesConfirmContract);

                //link the printer settings to the controller
                printerSettings = ssrsController.parmReportContract().parmPrintSettings();
                //print to pdf and always overwrite if the file exists
                printerSettings.printMediumType(SRSPrintMediumType::File);
                printerSettings.fileFormat(SRSReportFileFormat::PDF);
                printerSettings.overwriteFile(true);
                printerSettings.fileName(fileName);

                //run & save the report
                ssrsController.startOperation();
               info(strFmt("File Saved at %1", fileName));
            }
        }
    }
}

Tuesday, August 22, 2017

How to delete Duplicate Records through X++ in Dynamics Ax

static void DupDeleteRecords(Args _args)
{
VendTable       vendTable ;
int                   c1,c2;
Set fieldset = new set(types::Integer);
// create dictindex from unique index
DictIndex dictIndex = new dictIndex (tablenum(VendTable  ), indexnum(VendTable  ,AccountNumIdx));
;
select count(RecId) from vendTable  ;
c1=vendTable .RecId;
// these are fields from index add them to set
fieldset.add(fieldnum(VendTable  ,AccountNum));

ReleaseUpdateDB::indexAllowDup(dictIndex);
// set allow duplicates
ReleaseUpdateDB::deleteDuplicatesUsingIds(tablenum(VendTable  ),0,fieldset);
//re enable duplicates
ReleaseUpdateDB::indexAllowDup(dictIndex);
select count(RecId) from vendTable ;
c2=vendTable .RecId;
if(c1!=c2)
info(“Duplicate Deletion done”);
else
info(“No Duplicates found”);
}
force DB Synchronize :

static void forceDbSynchronize1(Args _args)
{
Dictionary dict;
int idx, lastIdx, totalTables;
TableId tableId;
Application application;
SysOperationProgress progress;
StackBase errorStack;
ErrorTxt errorTxt;
;
application = new Application();
dict = new Dictionary();
totalTables = dict.tableCnt();
progress = new SysOperationProgress();
progress.setTotal(totalTables);
progress.setCaption(“@SYS90206″);
errorStack = new StackBase(Types::String);
lastIdx = 0;
try
{
for (idx = lastIdx+1; idx <= totalTables; idx++)
{
tableId = dict.tableCnt2Id(idx);
progress.setText(dict.tableName(tableId));
lastIdx = idx;
application.dbSynchronize(tableId, false, true, false);
progress.incCount();
}
}
catch (Exception::Error)
{
errorTxt = strFmt("Error in table '%1' (%2)", tableId, dict.tableName(tableId));
errorStack.push(errorTxt);
retry;
}
setPrefix("@SYS86407");
errorTxt = errorStack.pop();
while (errorTxt)
{
error(errorTxt);
errorTxt = errorStack.pop();
}
}

update_recordset with joins

 update_recordset with joins update_recordSet storeTransfer         setting      TransactionId = transfertable.TransferId     join transfert...