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

Community site session details

Session Id :
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 241
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. 
 
 
 
I have the same question (0)
  • CU24061417-1 Profile Picture
    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
     
  • Community member Profile Picture
    4 on at
    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
    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
  • Community member Profile Picture
    4 on at
    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
    241 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
    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
  • Gerardo Rentería García Profile Picture
    23,431 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sumit Singh Profile Picture

Sumit Singh 3,227

#2
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 2,866

#3
Sohail Ahmed Profile Picture

Sohail Ahmed 2,682 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans