web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Customization in Source Accounting Explorer

(0) ShareShare
ReportReport
Posted on by 147

Hi,

I'm having requirement to add additional fields in accounting source explorer form and to write the logic to insert the data for those custom fields.

I have created customized fields in ASE temp table and written extension for AccountingSourceExplorerProcessor Class & method postDataUpdate.

I will update this field from another customized field of CustTrans table.

But updation is not happening in ASE table. While debugging came to know that Temp table not having any records. But at form level data is visible.

Any help how to resolve this issue.

Code is like this :

update_recordSet accountingSourceExplorerTmp
setting InvoiceDescription = custTrans.InvoiceDescription
where accountingSourceExplorerTmp.InvoiceDescription == ''"
join custTrans
where custTrans.Voucher == accountingSourceExplorerTmp.SubledgerVoucher
&& custTrans.TransDate == accountingSourceExplorerTmp.AccountingDate
join custTable
where custTable.AccountNum == custTrans.AccountNum
join Name from dirPartyTable
where dirPartyTable.RecId == custTable.Party;

I have the same question (0)
  • Suggested answer
    Mohit Rampal Profile Picture
    12,563 Moderator on at
    RE: Customization in Source Accounting Explorer

    Hi, I can't pinpoint issue in the code but to investigate which condition is failing you can convert this code to while select forupdate statement and test with providing value like Party in custTable in the select statement, also check if you have valid data that should be updated as per all table joins.

  • André Arnaud de Calavon Profile Picture
    299,947 Super User 2025 Season 2 on at
    RE: Customization in Source Accounting Explorer

    Hi TU1506,

    You are correct that the temporary table does not have records. These records are compiled when opening the form and specify criteria. Where exactly have you placed the coding you shared above?

    PS. Next time when you share coding, please use the rich formatting option and use Insert > Code and paste your coding. This will be better readable, namely when the coding is more complex and have more indentions.

  • TU1506 Profile Picture
    147 on at
    RE: Customization in Source Accounting Explorer

    Hi Andre,

    Thx for your reply.

    Will keep in mind about Rich Formatting Option.

    I created extension for AccountingSourceExplorerProcessor class and method postDataUpdate. I written code at PreHandler & PostHandler for checking but both are not updating.

    While filtering data at ASE form, events are executing.

    Hope it should help in resolving the issue.

  • TU1506 Profile Picture
    147 on at
    RE: Customization in Source Accounting Explorer

    Hi Andre,

    I am still looking for a solution.

    Any help would be a great!!

  • André Arnaud de Calavon Profile Picture
    299,947 Super User 2025 Season 2 on at
    RE: Customization in Source Accounting Explorer

    Hi TU1506,

    When the data is available on form level, have you tried adding your coding on the form? Did you also look for another method where possibly you can hook in while records are being compiled for the temporary table?

  • TU1506 Profile Picture
    147 on at
    RE: Customization in Source Accounting Explorer

    Hi Andre,

    Many thx for your advice. I tried by creating extension of ASE Form & created new button & coded at the clicked event of this button. Here at least I am able to fetch & update temporary table records. But here i am facing another issue with Join of temporary Table ASE with Cust Trans Table. Below is my code. Commented code are updating the records. But Join statement is not updating the table records.

    Any advice would be very helpful.

    [FormControlEventHandler(formControlStr(AccountingSourceExplorer, FormButtonControl1), FormControlEventType::Clicked)]
    public static void FormButtonControl1_OnClicked(FormControl sender, FormControlEventArgs e)
    {
    CustTrans             custTrans;
    CustTable             custTable;
    DirPartyTable       dirPartyTable;
    AccountingSourceExplorerTmp accountingSourceExplorerTmpLocal;
    FormDataSource   AccountingSourceExplorerTmp_ds;

    Info("Form Clicked");

    FormRun formRun = sender.formRun() as formRun;

    AccountingSourceExplorerTmp_ds = sender.formRun().dataSource(formDataSourceStr(AccountingSourceExplorer, AccountingSourceExplorerTmp)) as FormDataSource;

    accountingSourceExplorerTmpLocal = AccountingSourceExplorerTmp_ds.cursor();

    //update_recordSet accountingSourceExplorerTmpLocal
    // setting InvoiceDescription = "Test";
    // where accountingSourceExplorerTmpLocal.SubledgerVoucher == 'G-SLFT-000003661'; 

    update_recordSet accountingSourceExplorerTmpLocal
    setting InvoiceDescription = custTrans.InvoiceDescription
    where accountingSourceExplorerTmpLocal.InvoiceDescription == ''
          join custTrans
    where custTrans.Voucher == accountingSourceExplorerTmpLocal.SubledgerVoucher;
    && custTrans.TransDate == accountingSourceExplorerTmp.AccountingDate
         join custTable
    where custTable.AccountNum == custTrans.AccountNum;
    AccountingSourceExplorerTmp_ds.research();

  • André Arnaud de Calavon Profile Picture
    299,947 Super User 2025 Season 2 on at
    RE: Customization in Source Accounting Explorer

    Hi TU1506,

    Please use the rich formatting option to insert coding. It will then look like this and would be much easier to read.

    [FormControlEventHandler(formControlStr(AccountingSourceExplorer, FormButtonControl1), FormControlEventType::Clicked)]
    public static void FormButtonControl1_OnClicked(FormControl sender, FormControlEventArgs e)
    {
        CustTrans             custTrans;
        CustTable             custTable;
        DirPartyTable       dirPartyTable;
        AccountingSourceExplorerTmp accountingSourceExplorerTmpLocal;
        FormDataSource   AccountingSourceExplorerTmp_ds;
    
        FormRun formRun = sender.formRun() as formRun;
    
        AccountingSourceExplorerTmp_ds = sender.formRun().dataSource(formDataSourceStr(AccountingSourceExplorer, AccountingSourceExplorerTmp)) as FormDataSource;
    
        accountingSourceExplorerTmpLocal = AccountingSourceExplorerTmp_ds.cursor();
    
        //update_recordSet accountingSourceExplorerTmpLocal
        // setting InvoiceDescription = "Test";
        // where accountingSourceExplorerTmpLocal.SubledgerVoucher == 'G-SLFT-000003661'; 
    
        update_recordSet accountingSourceExplorerTmpLocal
        setting InvoiceDescription = custTrans.InvoiceDescription
        where accountingSourceExplorerTmpLocal.InvoiceDescription == ''
            join custTrans
            where custTrans.Voucher == accountingSourceExplorerTmpLocal.SubledgerVoucher;
               && custTrans.TransDate == accountingSourceExplorerTmp.AccountingDate
                join custTable
                where custTable.AccountNum == custTrans.AccountNum;
    
        AccountingSourceExplorerTmp_ds.research();
    }

    What is the exact issue you have with the coding? Do you have a build error, runtime error? On line 24 I see a semi-colon. That would cause a build error with the current coding.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 683 Super User 2025 Season 2

#2
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 620

#3
Martin Dráb Profile Picture

Martin Dráb 563 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans