0

I have two content types: A and B. B has a entity reference field to A. There are some fields in B which autofill from values in A.

When any of the fields which are used to autofill are removed from B, this deletes from A as well. Also because of reusing fields, I can't change permissions to ready only.

Is there any solution for this?

3
  • it sounds like you need an intermediate entity. Maybe a Paragraph type? Also, while it is typically a good idea to re-use fields as much as possible, it sounds like your use case is one in which there is a valid use case for unique fields per entity. Also, if you could share more about your approach, what has worked and what hasn't, that would help.
    – Beau
    Feb 4 at 13:06
  • Thanks for reply. So update on this issue is that I am using paragraph fields in content type A and resuing that in content type B. I am using entityreference autofill to populate values. I am able to disable edit/remove and add another button using hooks (to not let users delete any paragraph field item in content type B) but this option doesn't work in my case as I want to give users permission to delete an item from the list and donot edit or add a new item to the list in content type B. When node of content type B is deleted it also deletes the paragraph field items from content type A
    – Sherry K
    Feb 7 at 17:56
  • Thanks for the additional information, Sherry. I'm sorry that I wasn't more precise in my request: if you could edit your actual question with the new information, as well as relevant code or examples, that would help users understand the nature of your question. In your case, the situation sounds rather complicated and I think that more specific details would help. I'm not asking you to share any proprietary information, but entity names like A and B are difficult to visualize; perhaps use dummy names that make it a bit easier for a potential answer to visualize the situation. Thanks!
    – Beau
    Feb 7 at 20:43

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.