Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Contact I'd in plugin context

(0) ShareShare
ReportReport
Posted on by 821

Is it possibly to pass the contactid to a plugin when a portal contact performs an update on a record in Crm. At the minute it only identifies the contact as the crm system user regardless of what contact performs the operation .  Your advice would be great . Thanks G

*This post is locked for comments

  • gman0104 Profile Picture
    gman0104 821 on at
    RE: Contact I'd in plugin context

    Sorry Sures my bad i  will be performing a create also.  Im Using dynamics portals (8.3.2.85)

    Thanks G

  • RE: Contact I'd in plugin context

    Also you are not creating but is trying to update -- "Is it possibly to pass the contactid to a plugin when a portal contact performs an update on a record in Crm "

  • RE: Contact I'd in plugin context

    Which version are you using

  • gman0104 Profile Picture
    gman0104 821 on at
    RE: Contact I'd in plugin context

    Sorry the pre-image is not available on create of a record

  • RE: Contact I'd in plugin context

    Hi,

    Try to get the pre-image of entity record, this way you capture the contact id executing the action and not the system user.

    Regards,

    VC Suresh Kumar

  • Suggested answer
    ashlega Profile Picture
    ashlega 34,477 on at
    RE: Contact I'd in plugin context

    I think it's going to be very similar to this:

    dynamicscrmcoe.com/pass-a-logged-in-user-adxstudio-portal-wcf-service

    If you had a hidden field, you might assign contact id to that field, and you would have access to that attribute in the plugin (you'd have to add a custom attribute to the entity first, though)

    Point being, in the plugin context you only have access to the CRM entity being updated/created/deleted.

    Alternatively, I'm wondering if there is a contact reference on that entity already, in which case you might just read contactid from that reference (and you may have to use a pre/post image for that since you'll have it in the plugin target only when the attribute is, actually, updated)

  • gman0104 Profile Picture
    gman0104 821 on at
    RE: Contact I'd in plugin context

    I could be updating any entity so that's got nothing to do with a contact

  • sandeepstw Profile Picture
    sandeepstw 4,601 on at
    RE: Contact I'd in plugin context

    hi,

    In plugin you can access target entity id, you don't need to pass contact is separately.

    Thanks,

    Sandeep

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... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,432 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans