I'm beginning my journey into AX7 and recently encountered a problem that I cannot solve. I've extended a temporary (TempDB) table and added a new field. I then have a customization to a class where I am trying to add the new field to a field list of an insert_recordset statement. However the new field doesn't show up in intelli-sense and if I try to force it in, I get a compiler error. I've tried restarting IIS, refreshing AOT, restarting the azure box, synchronizing tables, etc. but nothing works. Finally when in debug mode, I can see the new field in the buffer so it seems that it was added correctly. Any help would be appreciated.
*This post is locked for comments
Thank you Mohammad, this may indeed work in my case. I'll update as soon as I confirm.
CustVendAgingCalculation has been initialized using static construct method. You can create a derived class, override the desired method. Write a post eventhandler for CustVendAgingCalculation's construct method change the return value to derived class object. This way your overridden code will be called instead of base code. Refer ievgensaxblog.wordpress.com/.../ax-7-trick-to-override-method-in-derived-class-without-overlaying for more info.
** Update **: The customization of the 'selectClosedTransactions()' method is in the ApplicationSuite model and is unable to 'see' the new field in CustVendAgingProcessingTmp table which is in the ApplicationSuiteExtension model because the extension model is above the ApplicationSuite model. If I add the new field by customization, all changes are in ApplicationSuite and everything works like it should. Is there a way to accomplish this using extensions?
I am modifying the 'selectClosedTransations()' method of the CustVendAgingCalculation class. I've added a new field 'ReportingCurrencyAmount' to the CustVendAgingProcessingTmp table and need to include this field in the insert_recordset statement of this method.
protected void selectClosedTransactions(CustVendAgingProcessingTmp _agingProcessingTmp)
{
var custVendTrans = this.setCustVendTransBuffer();
var custVendSettlement = this.setCustVendSettlementBuffer();
insert_recordset _agingProcessingTmp
(AccountNum, TransRecId, CurrencyCode, SettlmentRecId, ExchAdjustment, AmountCur)
select AccountNum from customersVendors ...
If you are customizing a standard class, you can implement a delegate and write the eventhandler in your extension model there you'll get the intellisense for the newly added fields. Implementing a delegate would still be overlayering. If you can tell us where exactly you are trying to make the changes probably we could suggest a solution without overlayering.
The table extension belongs to AppSuite extension, the customization is in AppSuite
Does your table extension and class belong to the same model.
André Arnaud de Cal...
291,965
Super User 2025 Season 1
Martin Dráb
230,836
Most Valuable Professional
nmaenpaa
101,156