Skip to main content

Notifications

Announcements

No record found.

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 48

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

  • Elowy GrootCRM Profile Picture
    48 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.

  • 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

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,272 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,931 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans