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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Excel Add-in - Custom field in AX table priceDiscTable is not being updated from Excel with new values.

(0) ShareShare
ReportReport
Posted on by 815

Hi,

AX 2012 R3 CU8.

We have created a new field in PriceDiscTable in AX.

User open the Excel and conenct to the AX using Dynamics AX Add-in,

User add the table PriceDiscTable.

Refresh and update the value of custom field for the PriceDisctable.

Publish the data but custom field for PriceDiscTable does not get updated.

I can see one class avaialble in AX "AXpriceDiscTable". If I add a new parm method and set method in the class then is there any other step required  before data can be updated from Excel for this custom field or is there any other way to update the custom field for this table from Excel?

thanks,

Regards,
Nadeem

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    The class changes require Full CIL to be executed, to generate code that can run server-side. Please only carry that out in a maintenance window with only 1 AX AOS running, unless you use a modelstore deployment with CIL already generated in the source environment.

  • Verified answer
    ColbyGallagher Profile Picture
    3,666 on at

    A full CIL will do the trick, but I've also had success just doing the steps below after the field is added to the table and the parm method added to the Axtable class. 

    AOT -> Tools  -> Cache -> refresh data & refresh dictionary

    Then open form AifService and click Refresh button.  

    Then re-deploy the AifGDS service group.  

    In Excel -> Add-Data -> Add-Tables, add your table and edit.

  • Nadeem Profile Picture
    815 on at

    Hi,

    Thanks for the reply.

    I will carry out these steps and confirm.

  • Nadeem Profile Picture
    815 on at

    Hi Colby,

    I have tried all the steps but it is still not updating from Excel.

    I have tried full compilation.

    Refreshed through AIF form using Refresh butrton.

    Re-deployed AIFGDS service group.

    Restarted AOS service as well.

    All details of change below.

    I have one new field in PriceDiscTable.

    I have modified class AXPriceDiscTable as below.

    New method:

    public PER_SalesContext parm_SalesContext(PER_SalesContext _PER_SalesContext = PER_SalesContext::All)

    {

       if (!prmisDefault(_PER_SalesContext))

       {

           this.setField(fieldNum(PriceDiscTable, PER_SalesContext), _PER_SalesContext);

       }

       return priceDiscTable.PER_SalesContext;

    }

    protected void setPER_SalesContext()

    {

       if (this.isMethodExecuted(funcName(), fieldNum(PriceDiscTable, PER_SalesContext)))

       {

           return;

       }

    }

    Modified method SetTableFields() of class AXPriceDiscTable.

    by adding below line to it.

    this.setPER_SalesContext();

    Is there anything else I have to do?

    thanks,

  • Verified answer
    Nadeem Profile Picture
    815 on at

    Hi Colby,

    It is working for me now.

    Below method name was not correct as it should be same as table field name and I also removed the default value.

    public PER_SalesContext parm_SalesContext(PER_SalesContext _PER_SalesContext = PER_SalesContext::All)

    I have corrected this as below.

    public PER_SalesContext parmPER_SalesContext(PER_SalesContext _PER_SalesContext )

    Carried out below steps.

    1- Incremental CIL generation.

    2- Refresh Caches.

        AOT -> Tools  -> Cache -> refresh data & refresh dictionary

    3- Open form AifService and click Refresh button.  

    4- Re-deployed AIFGDS service group.

    5- Tried from Excel and it worked.

    Thanks again.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans