Hi Everyone,
I am trying to trigger the power automate flow on change of customer price group and country field in customer table, Everything was working fine initially but now I see a problem that Whenever I try to release the sales order it shows the following error:
And when I try to post the sales order it show this error:
If requesting support, please provide the following details to help troubleshooting:
Error message:
An error occurred while applying changes from the object of type 'EnumExtension' with ID '50100' in the 'abc by default publisher 1.0.0.1' app to the application object of type 'Enum' with the ID '2000000001'. Failing delta: Type: 'EnumValueAddDelta'; TargetKind: 'Other'; OrdinalValue: '0'; The error was: NavErrorException - Metadata delta application failed due to the following error(s):
Internal session ID:
386c76cc-cfff-4475-bbd2-045aaaf8cb66
Application Insights session ID:
f4021806-a05e-48b4-8d41-9bec2d25d158
Client activity id:
eda2518a-5c84-4128-bbe8-1d66a7eeb4ce
Time stamp on error:
2026-07-29T06:19:31.0617912Z
User telemetry id:
a610a531-7a97-4e58-bd85-8f15cdadf279
AL call stack:
ErrorMessagesRecommendationExt(PageExtension 7900)."Description - OnDrillDown"(Trigger) line 10 - Error Messages with Recommendations by Microsoft version 27.4.45366.45675
Custom dimensions:
[{"Item1":"ErrorCallStack","Item2":"\"Release Sales Document\"(CodeUnit 414).OnAfterReleaseSalesDoc(Event) line 2 - Base Application by Microsoft version 27.4.45366.51998\\\"Release Sales Document\"(CodeUnit 414).Code line 95 - Base Application by Microsoft version 27.4.45366.51998\\\"Release Sales Document\"(CodeUnit 414).ReleaseSalesHeader line 5 - Base Application by Microsoft version 27.4.45366.51998\\\"Sales-Post\"(CodeUnit 80).ReleaseSalesDocument line 18 - Base Application by Microsoft version 27.4.45366.51998\\\"Sales-Post\"(CodeUnit 80).CheckAndUpdate line 48 - Base Application by Microsoft version 27.4.45366.51998\\\"Sales-Post\"(CodeUnit 80).RunWithCheck line 58 - Base Application by Microsoft version 27.4.45366.51998\\\"Sales-Post\"(CodeUnit 80).OnRun(Trigger) line 2 - Base Application by Microsoft version 27.4.45366.51998\\\"Sales-Post (Yes/No)\"(CodeUnit 81).RunSalesPost line 12 - Base Application by Microsoft version 27.4.45366.51998\\\"Sales-Post (Yes/No)\"(CodeUnit 81).Code line 28 - Base Application by Microsoft version 27.4.45366.51998\\\"Sales-Post (Yes/No)\"(CodeUnit 81).OnRun(Trigger) line 10 - Base Application by Microsoft version 27.4.45366.51998\\\"Sales Header\"(Table 36).SendToPosting line 18 - Base Application by Microsoft version 27.4.45366.51998\\\"Sales Invoice\"(Page 43).PostDocument line 15 - Base Application by Microsoft version 27.4.45366.51998\\\"Sales Invoice\"(Page 43).\"Post - OnAction\"(Trigger) line 2 - Base Application by Microsoft version 27.4.45366.51998\\"},{"Item1":"CreatedOn","Item2":"29/07/26 11:49"}]
Here is the code
enumextension 50100 EventCategoryExt extends EventCategory
{
value(0; "Sales")
{
}
}
codeunit 50101 BusinessEventHandler
{
[ExternalBusinessEvent('custpricegrouporcountrychanged',
'Customer Price Group or Country changed',
'Triggered when Customer Price Group or Country/Region Code is updated',
EventCategory::"Sales")]
procedure CustomerPriceGroupOrCountryChanged(customerId: Guid)
begin
end;
[ExternalBusinessEvent('contactcountrychanged',
'Contact Country changed',
'Triggered when Country/Region Code is updated on a Contact',
EventCategory::"Sales")]
procedure ContactCountryChanged(contactId: Guid)
begin
end;
[EventSubscriber(ObjectType::Table, Database::Customer,
OnAfterValidateEvent, "Customer Price Group", false, false)]
local procedure OnValidateCustomerPriceGroup(var Rec: Record Customer)
begin
CustomerPriceGroupOrCountryChanged(Rec.SystemId);
end;
[EventSubscriber(ObjectType::Table, Database::Customer,
OnAfterValidateEvent, "Country/Region Code", false, false)]
local procedure OnValidateCountryRegionCode(var Rec: Record Customer)
begin
CustomerPriceGroupOrCountryChanged(Rec.SystemId);
end;
[EventSubscriber(ObjectType::Table, Database::Contact,
OnAfterValidateEvent, "Country/Region Code", false, false)]
local procedure OnValidateContactCountryRegionCode(var Rec: Record Contact)
begin
ContactCountryChanged(Rec.SystemId);
end;
}

Report
All responses (
Answers (