Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

BP error Fields using RefRecId or a derived type must have a relation defined for that field

Posted on by

Hi Experts

I keep getting this BP error ""Fields using RefRecId or a derived type must have a relation defined for that field." for myCustomName field" BP 457

For my custom table which has only 2fields myCustomName extneded from name & myCustomDesc extended from description & has rec id set as primary & cluster index.

Please suggest a fix

Thanks

Mav

  • Mav Profile Picture
    Mav on at
    RE: BP error Fields using RefRecId or a derived type must have a relation defined for that field

    This was finally resolved by reimporting the previous db copy, recreating the table & synching.

    This was definitely due to some bad synch issue.

  • Martin Dráb Profile Picture
    Martin Dráb 230,198 Most Valuable Professional on at
    RE: BP error Fields using RefRecId or a derived type must have a relation defined for that field

    Isn't the table upgraded/imported from an older version? Surrogate keys were introduced in AX 2012.

    If you manually create a RecId, AX automatically adds DataAreaId and Partition fields. Theforefore you'll have an index with three fields. Surrogate keys use a single field only. At least that's how it worked when I checked it (when AX 2012 was released).

  • Mav Profile Picture
    Mav on at
    RE: BP error Fields using RefRecId or a derived type must have a relation defined for that field

    @Gunjan Clearing cache did not helped.

    @Sergei I have been trying this, get some issue in db synch, looks like some element id issue & looks like i may have to restore old db .

    @Martin Strangely i do not see surrogate key in the drop down for primary & cluster,  quick question isnt surrogate key by default recid , is my understanding wrong.

  • Martin Dráb Profile Picture
    Martin Dráb 230,198 Most Valuable Professional on at
    RE: BP error Fields using RefRecId or a derived type must have a relation defined for that field

    By the way, why did you create an index with RecId and used it as primary and cluster? Isn't keeping the default, the surrogate key, both easier and more efficient?

  • Verified answer
    Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,089 on at
    RE: BP error Fields using RefRecId or a derived type must have a relation defined for that field

    Hi Mav,

    If you create a copy of the table or a completely new table with the same fields. Do you see the same issue?

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,421 on at
    RE: BP error Fields using RefRecId or a derived type must have a relation defined for that field

    Have you tried clearing the cache?

  • Mav Profile Picture
    Mav on at
    RE: BP error Fields using RefRecId or a derived type must have a relation defined for that field

    Yep still getting the error

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,421 on at
    RE: BP error Fields using RefRecId or a derived type must have a relation defined for that field

    Hi Mav,

    Do you have data in this table? If not can you try deleting Field1 and create it again to check if you still get the BP error?

  • Mav Profile Picture
    Mav on at
    RE: BP error Fields using RefRecId or a derived type must have a relation defined for that field

    Yep , below are screen caps

    I get this BP error for Field 1 Fields using RefRecId or a derived type must have a relation defined for that field. Bp 457

    Table property

    pastedimage1607095851253v1.png

    Field 1

    pastedimage1607095863765v2.png

    Field 2

    pastedimage1607095900242v4.png

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,421 on at
    RE: BP error Fields using RefRecId or a derived type must have a relation defined for that field

    Hi Mav,

    The field CustomeName is using "Name" as EDT and myCustomDesc is using "Description". Neither of the fields is using RefRecId. Correct?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans