FIELD_INTEGRITY_EXCEPTION - Invalid reference User.Profile.Name of type sobjectField in file

Issue #2003 resolved
Igor Pavelkevich created an issue

No description provided.

Comments (10)

  1. Scott Wells repo owner

    Thank you, Igor. As stated in email, you can disable LWC deployment via the Tooling API as a temporarily workaround, and I'll take care of this (and try to generalize it) for next week's release so that you can safely reenable it and take advantage of the performance benefits of deployment via that channel.

  2. Scott Wells repo owner

    No, not at all. Please see the first entry from the release notes about #1589. You can work around this issue directly in IC2 by disabling Tooling API-based deployment of LWC, but if you're experiencing this issue, before you do so please enable debug logging for metadata deployment, reproduce this issue, and either attach or email the resulting idea.log. That will allow me to address the remaining variants that you're encountering. My goal is to have 100% reliable deployment of LWC components with the Tooling API enabled, routing to the Metadata API in known corner-cases as appropriate, but otherwise providing a much faster deployment experience for LWC components than is otherwise possible. Thanks!

  3. Wilfred Greyling

    Excellent, thanks.

    The issue only appears for me I try to use:
    import UserProfileName from '@salesforce/schema/User.Profile.Name';

  4. Scott Wells repo owner

    Thanks. I've already implemented a fix for the FIELD_INTEGRITY_EXCEPTION on deployment via the Tooling API. IC2 just wasn't handling field imports that include intermediate relationships properly. I'll also add support for that for code completion and reference resolution, and the overall fix will be in the next build, likely Thursday of next week. Thanks again for providing the concrete example! Hopefully this puts this to rest once and for all.

  5. Scott Wells repo owner

    I've just committed a change that adds full support for LWC field imports that include intermediate relationships. All of these changes will be included in the next official build.

  6. Scott Wells repo owner

    Delivered in 2.1.9.6. After updating, please re-enable LWC deployment via the Tooling API and let me know if you see any further incorrect deployment failures.

  7. Wilfred Greyling

    Excellent, thank you, Scott. Installed the update this morning. Will give feedback.
    Thanks for being on the ball. We all love using the tool.

  8. Log in to comment