Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Answered

Resolve error in Business Central extension

Posted on by 188
Hello! I got a mail from Business Central telling me that an old extension we have is not compatible with version 24.0, and I need to fix it. The error I am getting is this:

 "src/tables/Job.tabext.al (63,22) - Error AL0155: A member of type Field with name 'Location Code' is already defined in Table 'Job' by the extension 'Base Application by Microsoft (24.0.16410.21216)'.", 

"src/Pages/JobCard.pageext.al (67,19) - Error AL0155: A member of type Field with name 'Location Code' is already defined in Page 'Job Card' by the extension 'Base Application by Microsoft (24.0.16410.21216)'." ] } ]

I totally get the errors, however I am unsure about how to resolve it, because I assume we would like to keep the data in the field, so removing it is probably not an option, and renaming it makes the upload fail, because Business Central can't find the field 'Location Code', and removal of the field is not allowed.

What is the best way to resolve this?
Categories:
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 63,357 Super User on at
    Resolve error in Business Central extension
    Great. Just to add one more point, although it is not mandatory yet, in the last version, Microsoft added the concept of Namespaces, you may consider using this.
    More details: Business Central 2023 wave 2 (BC23): Segment AL code and reduce naming conflicts with namespaces (Namespaces in AL)
     
     
    Thanks.
    ZHU
  • Hagru Profile Picture
    Hagru 188 on at
    Resolve error in Business Central extension
    Thank you for the response!
     
    Will have to get a Prefix / Suffix for future development it seems, of course that sounds super handy, just never knew about it.
     
    Another thing I think I must've always overlooked is the Sync Mode when uploading an extension to a Production environment. I've used it a lot in my launch file under testing when working with sandboxes, but it never worked in Production, so I appreciate the link Yun Zhu, I now know how to use it in Production. 
  • Verified answer
    YUN ZHU Profile Picture
    YUN ZHU 63,357 Super User on at
    Resolve error in Business Central extension
    Hi, Solving the installation problem is not difficult.
    Business Central 2021 wave 2 (BC19): In-depth testing for Force Sync mode in Production Environment (Renaming tables, Renaming fields, Changing field type…)
     
    The problem is the data, if you need to keep the old data in this field you need to move the data to the new fields first.
    Once you install a new version with Force Sync, this data will be gone.
    It is also a good idea to export it with Configuration Package in advance.
     
    Hope this helps as well.
    Thanks.
    ZHU
  • Saurav.Dhyani Profile Picture
    Saurav.Dhyani 14,416 User Group Leader on at
    Resolve error in Business Central extension
    For Doing AL Development you need to register a 3-word prefix with Microsoft.
     
    Microsoft will make sure that you get unique prefix or suffix. Its mandatory to make sure if there is a conflict you have rights to the prefix or suffix.
     
    Once you get prefix / suffix -
    1. You will use that for all your customer for doing devs.
    2. Every custom field in table extension and any new object that you are creating should have prefix or suffix.
    3. You can also extend your prefix with your customers, if they are also doing development.
     
     
    Regards,
    Saurav Dhyani
  • Verified answer
    Mohana Yadav Profile Picture
    Mohana Yadav 48,497 Super User on at
    Resolve error in Business Central extension
    Add new field with Prefix/Suffix and move the data from old field to new field and then remove the field with forcesync while uploading.
    test in sandbox first.
  • Hagru Profile Picture
    Hagru 188 on at
    Resolve error in Business Central extension
    Not always easy to know what Microsoft will add in the future, and what they will call the field. It's an old extension, and I'm not the one that made it, but alas, lesson learned.
     
    Is there any way to resolve the error?
  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 48,497 Super User on at
    Resolve error in Business Central extension
    That is the reason that you have to use Prefix or Suffix while extending the standard tables/pages.
    You should have used something like "ABC Location Code" in table extension instead of just 'Location Code"
     
  • Hagru Profile Picture
    Hagru 188 on at
    Resolve error in Business Central extension
    Yes, I am aware, but renaming it or removing it does not work because then Business Central can't find the field, and the upload of the extension fails. Which is why I am asking how to actually resolve.
  • Suggested answer
    gdrenteria Profile Picture
    gdrenteria 4,516 Super User on at
    Resolve error in Business Central extension
    hi
    What it tells you is that there is a field that natively now exists or is visible in Business Central, and you have extended it to some extent.
    Therefore, you should not use it.
    BR
    GR

Helpful resources

Quick Links

First Dynamics 365 Community Call (CRM Edition)

Don't miss the first D365 Community Call 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... 285,480 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,450 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans