Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

The Customer Posting Group does not exist. Identification fields and values: Code=''

(1) ShareShare
ReportReport
Posted on by 237
Hello everyone, 

I'm trying to un-apply a customer payment from two invoices but I'm getting the following error:
 
The Customer Posting Group does not exist. Identification fields and values: Code=''
 
 
However, the three documents and the customer have the same Customer Posting Group. 
 
How can I fix it? 
 
Thanks in advance. 
 
 
 
  • CU24061417-1 Profile Picture
    CU24061417-1 7 on at
    The Customer Posting Group does not exist. Identification fields and values: Code=''
    Hi,
     
    as mentioned the issue is, that the Field 44 (Posting Group) is not set in the Detailed Cust. Ledger Entry. This also happens on the vendor side, when the same field in Detailed Vendor Ledger Entry is not filled.
    I wrote a small work around for the time being which set the empty field to the Posting Group set on the customer or vendor.
     
    codeunit 60750 "Bugfix Unapply"
    {
        InherentPermissions = X;
        Permissions = tabledata "Detailed Cust. Ledg. Entry" = RM,
                        tabledata "Detailed Vendor Ledg. Entry" = RM;
    
        [EventSubscriber(ObjectType::Codeunit, 12, 'OnUnapplyVendLedgEntryOnBeforeSecondLook', '', false, false)]
        local procedure BugfixPostingGroupVendorOnUnapplyBeforeSecondLook(NextDtldLedgEntryNo: Integer; var DtldVendLedgEntry2: Record "Detailed Vendor Ledg. Entry")
        var
            Vendor: Record Vendor;
        begin
            if DtldVendLedgEntry2.FindSet() then
                repeat
                    Vendor.Get(DtldVendLedgEntry2."Vendor No.");
                    if DtldVendLedgEntry2."Posting Group" = '' then begin
                        DtldVendLedgEntry2."Posting Group" := Vendor."Vendor Posting Group";
                        DtldVendLedgEntry2.Modify();
                    end;
                until DtldVendLedgEntry2.Next() = 0;
        end;
    
        [EventSubscriber(ObjectType::Codeunit, 12, 'OnOnUnapplyCustLedgEntryOnBeforeSecondLook', '', false, false)]
        local procedure BugfixPostingGroupCustomerOnUnapplyBeforeSecondLook(NextDtldLedgEntryNo: Integer; var DtldCustLedgEntry2: Record "Detailed Cust. Ledg. Entry")
        var
            Customer: Record Customer;
        begin
            if DtldCustLedgEntry2.FindSet() then
                repeat
                    Customer.Get(DtldCustLedgEntry2."Customer No.");
                    if DtldCustLedgEntry2."Posting Group" = '' then begin
                        DtldCustLedgEntry2."Posting Group" := Customer."Customer Posting Group";
                        DtldCustLedgEntry2.Modify();
                    end;
                until DtldCustLedgEntry2.Next() = 0;
        end;
    }
    
     
    Best regards,
    Daniel
     
  • The Customer Posting Group does not exist. Identification fields and values: Code=''
    Hi Judy,

    we have the same issue. The debugger throws the error in Codeunit 12 (Line 5132 in Procedure UnapplyCustLedgEntry) because the Field Posting Group in the Record Detailed Cust. Ledger Entry is empty.

    Issue is in old versions of Dynamics NAV this is field is not available and therefor not filled when migrating data to BC.
     
    Best Regards,
    Daniel
  • Judy Profile Picture
    Judy Microsoft Employee on at
    The Customer Posting Group does not exist. Identification fields and values: Code=''
    Hi Esteban,
     
    Can you try to debug the code to see where it fails?
    Maybe you can create a batch to update the Posting Group with the one from the Vendor Ledger Entry in case the value is blank.
    Hope it helps.
     
    Best Regards,
    Judy
  • The Customer Posting Group does not exist. Identification fields and values: Code=''
    I have the exact same problem. 
    When I try to unapply a payment, same error pops up: 
    The Customer Posting Group does not exist. Identification fields and values: Code=''
     
    One thing I observed  is that this issue started after the system upgrade to BC 23.
     
    Any suggestions to fix this issue are welcome. It's quite frustrating.
     
    Thank you.
     
  • Esteban Navarro  Profile Picture
    Esteban Navarro 237 on at
    The Customer Posting Group does not exist. Identification fields and values: Code=''
    Hello gdrenteria
     
    Thanks for the response.
     
    The documents have a Customer posting group.
     
    Also customer. 
     
  • Suggested answer
    Judy Profile Picture
    Judy Microsoft Employee on at
    The Customer Posting Group does not exist. Identification fields and values: Code=''
    Hi,
     
    You can set up as many posting groups as you need. After you have set up the customer posting groups, you must enter a posting group code on each customer card.
    Best Regards,
    Judy
  • gdrenteria Profile Picture
    gdrenteria 12,920 Most Valuable Professional on at
    The Customer Posting Group does not exist. Identification fields and values: Code=''
    Hello good day, 
    Do you select this option, and see that all the records have the value of CustomerPostingGroup?

    You could copy the detail indicated in the message, it will surely give us more clues.
    Greetings

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,642 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,371 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans