web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Dynamics Portal: Entity reference in Entity Form

(0) ShareShare
ReportReport
Posted on by 54

Pff, entity references can be difficult in the Dynamics portal...

I have a N:N reference between contact and account ("account is managed by contact").

When a portal user is adding a new account record in the portal, I would like to have the newly created account linked to the portal user (the account is managed by the portal user from now).

Somehow I fail... (The portal user has all the necessary create and "add to" privileges.)

What I tried:

  • Set Entity Reference On Save = Yes
  • Entity Logical Name = Contact
  • Relationship Name = "Owner of"
  • Target Lookup Attribute Logical Name = Empty
  • Populate Lookup Field = No
  • Reference Entity Source Type = Current portal user

And now I have to select the entity related to the current portal user... Instead I want to relate *with* the current user.

Is there an other way? Or is it best practice to build a workflow that connects the new account to the portal user?

Thanks!

Elowy

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Nicholas Hayduk Profile Picture
    2,863 on at
    RE: Dynamics Portal: Entity reference in Entity Form

    Hi Elowy,

    I think what's causing this to be more difficult than you think it should be is the fact that it is an N:N relationship.

    If there was only a single contact related to the account, then you could use Entity Form Metadata to set the value of the lookup on the account to the contact (using Set Value on Save, which has the option to use the Current Portal User).

    I think what you'll need to do is create a lookup on the account that will store the contact that created it (using the technique I mentioned above), then use a workflow/plugin/flow to set the N:N relationship.  When using a workflow/plugin/flow, you still somehow need to know which contact created it, which you don't unless you do it explicitly (there is no concept of "created by contact" when record are created in the Portal out of the box.

    Hope that helps.

    Nick

  • Elowy GrootCRM Profile Picture
    54 on at
    RE: Dynamics Portal: Entity reference in Entity Form

    Hi Nick,

    Thanks for your answer. I will try to do it like you described.

    Next challenge; create a N:N relationship from Flow or Workflow engine...

    Did that before with the Ultimate Workflow Toolkit, so hopefully that still works.

    Regards,

    Elowy.

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
UllrSki Profile Picture

UllrSki 2

#3
SC-08081331-0 Profile Picture

SC-08081331-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans