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 :
Finance | Project Operations, Human Resources, ...
Answered

Getting BPErrorUnknownLabel warning when label exists

(3) ShareShare
ReportReport
Posted on by 98
Greetings,
 
I'm pretty new to x++ development and I'm getting quite frustrated with this particular best practice warning showing up. I've searched some archived posts, but none of the suggestions really fix my issue. We have a custom en-US label file in our model called "RRL.en-US.label.txt". The Label File Id field in the properties shows "RRL".
 
I added the label file to my project in VS 2022 and added some new labels. I placed the Label Ids in some code, example shown below. I've verified that the casing is correct... especially since VS lets you copy the Label Id code directly into the clipboard by right clicking on the Label Id field in the label file.
 
// Check for existence of args
if (!_args)
{
    throw error("@RRL:SalesConfDeleteNoArgsError");
}

// Check if caller is CustConfirmJour form
if (_args.callerName() != formStr(CustConfirmJournal))
{
    throw error("@RRL:SalesConfDeleteCallFromOutsideError");
}
 
If I save my .xpp class file or complete a build or rebuild of my project, the following BP Rule warnings show:
 
BP Rule: [BPErrorUnknownLabel]:Path: [dynamics://Class/RRLCallSalesConfirmationCleanup/Method/main]:Unknown label '@RRL:SalesConfDeleteNoArgsError'. Labels are case-insensitive, but it is recommended to use upper casing when referring to legacy labels (such as the label id @SYS12345) and exact casing for modern labels (such as 'MyLabelId' in @MyLabelFile:MyLabelId).
 
BP Rule: [BPErrorUnknownLabel]:Path: [dynamics://Class/RRLCallSalesConfirmationCleanup/Method/main]:Unknown label '@RRL:SalesConfDeleteCallFromOutsideError'. Labels are case-insensitive, but it is recommended to use upper casing when referring to legacy labels (such as the label id @SYS12345) and exact casing for modern labels (such as 'MyLabelId' in @MyLabelFile:MyLabelId).
 
From previous posts, I have done the following to try and troubleshoot:
  1. Complete a rebuild of the solution.
  2. Complete a rebuild of the project.
  3. Make a change within the label file, save, and rebuild the solution.
  4. Do a build of the entire model.
  5. Check the .md file in the model folder in the PackagesLocal directory. The new labels are present here.
  6. Restart VS 2022 after saving all files then complete a build of the solution.
When I do a build of the solution or project, I get the BP Rule warning. If I complete a build of the model, the BP Rule doesn't show up, even though I have BP check enabled during the build. Finally, when I test within the environment UI, the label text shows up without any issue.
Categories:
I have the same question (0)
  • Jonas "Jones" Melgaard Profile Picture
    4,988 Most Valuable Professional on at
    This sounds odd.. My bet is that it's some weird cache issue in Visual Studio, back in the day I had to restart my developer environments, maybe it can resolve this issue. Is this a UDE environment?
     
    Do you have other languages than EU-US? I.e. EN-GB.
    If you generate a CAR, does it also appear? I assume not, since it does not appear when you compile the entire model.
     
  • Verified answer
    Layan Jwei Profile Picture
    8,118 Super User 2025 Season 2 on at
    Hi,
     
    Please try restarting the VM, the BP warning should go.
     

    Thanks,
    Layan Jweihan
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future.

  • Suggested answer
    Navneeth Nagrajan Profile Picture
    2,438 Super User 2025 Season 2 on at
    Hi jmcmillan,
     
    Indeed an interesting scenario and label synchronisation can be hard with respect to best practice resolution, at times.

    Question:
    1. While building the models did you select the build labels option under Build labels -> Options -> Build Labels (en-US) section? 
     
    Suggestion:
    1. While copying the label can you select "Match exactly" from the label editor window after finding the labels, copy the label to code and build the label/project. Had an issue from the BP side for a multi-lingual implementation where i copied the US label and it started popping up the label case insensitivity BP warning.


    Let us know. Happy to answer questions, if any.
  • jmcmillan Profile Picture
    98 on at
    Thank you all for replying. Here is what I found with each suggestion.
     
     
    It is a cloud-hosted environment with VS 2022. I think you were onto something with it being a cached issue, as you'll see in another user's reply. The BP warning does not show in the CAR for our custom model.
     
     
    I did check that when completing a full build of the model that "Build labels" was checked. I tried it with "All" selected, then replaced it back to "en-US" as that is the language the label file uses. It did not resolve the issue. But then again I didn't think so as I checked the resultant label file in the metadata with Notepad++ and could see the new entries I had just created. Thank you for the suggestion though.
     
     
    This did actually seem to fix the underlying issue to where the BP warning no longer shows after building/rebuilding my solution/project. So I think Jonas was accurate in there is some sort of cached data issue in regards to the BP framework and how it looks up existing data. I tried the IIS Reset option in the Dynamics extension in VSS to see if it would accomplish the same thing, but it did not.
     
    I wonder if there is an easier way to resolve this than having to restart the VM every time I want to reliably check my code?
     
    I did go ahead and mark your suggestion as a verified answer, but still hope someone can respond with a easier solution.
     
     
  • Jonas "Jones" Melgaard Profile Picture
    4,988 Most Valuable Professional on at
    I need to have a play with it again. Don't recall it being an issue with UDE environments. 
    Are you on the latest platform update?
  • jmcmillan Profile Picture
    98 on at
    On 10.0.43 currently. But it appears it has been an issue for others in the past, looking at some of the Google searches and archives on this forum site.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 490 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 429 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 241 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans