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 error : "Object reference not set to an instance of an object" while publishing new price/discount agreement journal lines

(0) ShareShare
ReportReport
Posted on by 480

Hi All,

I want to add new Price/discount agreement journal lines with Excel Add-In in AX 2012 R3 CU8.

Data is opened properly in Excel and if I press Publish button without adding any line everything is fine.

After adding a new record and filling it with data I get the following error:

"An error occurred. The data in the workbook and the behavior of any

add-ins may not be correct. Consider contacting your system

administrator about this problem.

 

Object reference not set to an instance of an object."

If an exported row is modified then changes are updated in AX successfully. The problem appears if a new record is added.

I tested it on three environments: AX 2012 R3 CU8 Demo VPC, clean AX 2012 R3 CU8 installation with Contoso data and clean AX 2012 R3 CU8 installation with some initial data. There are no customization of the system.

Attaching VS debugger to Client, Excel or AOS doesn't cause any exception catch.

Haves anybody face that issue?

Thanks,

Lukasz

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,075 Super User 2025 Season 2 on at

    Hi Lukasz,

    Have you added all fields from the journal lines in Excel? I have seen the same error on other places when e.g. a wrong enumeration value was used. Probably a field which was not added as column in Excel requires a valid value.

  • lcwik Profile Picture
    480 on at

    Hi André,

    In this case a resource file is used with specified columns - AOT\Resources\PriceDiscAgreement_xlsx. Design section on Dynamics AX ribbon is not available then. The resource file needs to be modified to change the columns set.

    I'm wondering if only I face this issue or it's a bug.

    The functionality is available here:

    Accounts receivable -> Journals -> Price/discount -> Price/discount agreement journals -> Lines (button on form) -> Edit in Excel.

    I tried to find any hotfix related to this issue and I installed KB3063961 but still no luck.

    Thanks,

    Lukasz

  • lcwik Profile Picture
    480 on at

    BTW: it uses PriceDiscServices and not tables directly.

  • André Arnaud de Calavon Profile Picture
    301,075 Super User 2025 Season 2 on at

    Hi Lukasz,

    Have you checked if all fields were used when creating the lines?

    Have you also tried to create a new Excel file using the PriceDiscService rather than using the file from the resource?

  • lcwik Profile Picture
    480 on at

    Hi André,

    Yes, I tried to add all the service fields in Excel but still no luck.

    The system is up to date. Office is updated as well so I don't have any clue why it doesn't work:|

    I tested it again on CU8 Demo VPC and it works, so sorry for that wrong information. However, in our installations it doesn't work.

    Lukasz

  • Community Member Profile Picture
    on at

    1) First, Check your data, if it is correct. i think something is missing there.

    2) Second, Reinstall excel addins component as it may resolve your issue

    Please share your findings with me. Thanks

  • Community Member Profile Picture
    on at

    Hi Lukasz,

    we are facing the same issue in our environment (AX 2012 R3 CU8). I've reinstalled the office add-ins for Microsoft Dynamics AX but it doesn't help. Have you found any information regarding the possible solution?

    Thank you!

    Igor

  • Community Member Profile Picture
    on at

    I have seen this where the AX configuration on the local machine does not match the server in which you are trying to publish. Open the Dynamics AX configuration utility and change the connection to the server which you are publishing. You will then need to do a wcf refresh.

  • Community Member Profile Picture
    on at

    what values you are giving in RecId & JournalBatchNum columns ?

  • Community Member Profile Picture
    on at

    Hi Ben, configuration is ok. Other services are working fine. The same service (PriceDiscAdmTransDocService) is working fine in case of record update. We have the issue only if trying to create new records. Thanks

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