Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Answered

Error posting project invoice: Field Contact name must be filled in.

Posted on by Microsoft Employee

We've been using project invoices using subscription fees for many years in AX and I've never seen this error before.  This project contract and project are very routine, based on what we usually do, and in fact this same project contract and funding source was last invoiced in July 2020 with no problem.

When we post the project invoice proposal, which contains one subscription fee, we are getting the error "Field Contact name must be filled in." and are stopped.  

I've tried posting in batch and manually in foreground.  I have tried deleting the proposal and recreating it.  Still the error when I try to post the invoice.

There is no Contact ID selected in the "Other" fasttab of the Funding Source.  We only use that field in one country, and this proposal is not in that legal entity.  This is the only place I can think there would be a contact.  What Contact name could this message be referring to?  Any help would greatly be accepted.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error posting project invoice: Field Contact name must be filled in.

    We determined the cause of this error!   The customer master had inadvertantly been set with the eInvoicing flag set to Yes (box ticked).  Apparently there is some code in the project invoice posting logic that if this field is set on then you have to have a contact id on the funding source.  There are exceptions for legal entities in Denmark and Norway, which take you down different paths.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error posting project invoice: Field Contact name must be filled in.

    We determined the cause of this error!   The customer master had inadvertantly been set with the eInvoicing flag set to Yes (box ticked).  Apparently there is some code in the project invoice posting logic that if this field is set on then you have to have a contact id on the funding source.  There are exceptions for legal entities in Denmark and Norway, which take you down different paths.

    checkBeforePostingEinvoice.png

  • Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Error posting project invoice: Field Contact name must be filled in.

    Good morning Lynn,

    I think you are right. Have a talk with a developer who can debug this issue.

    I really wonder where it comes from.

    Maybe a new / hidden modification or some other strange thing related to your customers account.

    Would be great if you could keep us updated here.

    Many thanks and best regards,

    Ludwig

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error posting project invoice: Field Contact name must be filled in.

    Yes Ludwig, this is the one place I know of where anything about a Contact shows up in the project invoicing process, so I have already checked the funding source for this.  The Contact ID field is blank on the Funding Source used on the proposal. In fact there are no choices in the dropdown list to choose from because there are no contacts associated with the funding source customer in that way.  This is completely normal for us in the legal entity where this problem is occurring.

    I have tried to recreate the problem in our UAT environment using the same project contract, funding source id, and customer.  The proposal posted just fine without any error, so I was not able to recreate the issue to use the debugger.  

    I have also checked the Customer master and the Contact there in the Contacts fasttab for email address, which is used by the Print Management rule to email out the invoice via third party forms processing software.  That customer master setup is something that changed since the last successful billing on this project contact/funding source, so it seemed like the likely candidate.   I've made UAT look identical to how PROD looks now.  Still this did not cause the problem to happen.  We suppress emailing out of our non-production environment, but I see in the background that the pdf document was rendered successfully, and the XML shows that the email address was picked up correctly from the customer master contact.  There is no 'ContactName' field in the XML or anything similar.

    I am on the working assumption that the error is coming from AX posting process and not from our forms processing third party software, since the posting does not occur and I see no XML generated for the forms processing in PROD.  This could be wrong assumption, but since I can't reproduce in UAT, I can't be sure.

    My next approach will be to ask one of our team's developers to determine what label in AX is the message "Field Contact name must be filled in."  and then determine what code might be invoking that label to be written to the infolog.

  • Verified answer
    Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Error posting project invoice: Field Contact name must be filled in.

    Hello Lynn,

    There is a contact setting in the project contract.

    Just open the project contract, check the funding sources and in the details form/button there is a others tab that holds a contact.

    Maybe that is the issue?!

    Best regards,

    Ludwig

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error posting project invoice: Field Contact name must be filled in.

    Hi Ludwig, thanks for your reply.  We are in a maintain and run mode on AX until we can upgrade, so we are making very few, almost no changes to our code base.   It's been a long time since we did a new build and a code drop to PROD.  The problem is just on this one particular project contract, out of hundreds of project invoices we do every week.  So I think it's more likely that some data is messed up in a new way I've never run into.  I'm just not sure where to look because I don't know what Contact Name could be related to a project invoice proposal.   I also might try to get these transactions fed into our UAT system to try to recreate the problem so we can use debugger to find the bit of code that is producing this message and why.

  • Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Error posting project invoice: Field Contact name must be filled in.

    Hello Lynn,

    If things worked fine in the past then I would expect that some modification came into your AX system.

    Are you aware of any code changes, customizations / enhancements that have been made recently?

    Best regards,

    Ludwig

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,696 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,490 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans