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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Populate Regarding field in activity with url

(0) ShareShare
ReportReport
Posted on by

Hi all,

We have a Web portal which use some url of Dynamics. We want to have a button to open a new activity with a client pre-populated. We already have the id of the client.

Does somebody know how can I populate the client in the url for the new activity?

Thanks! 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Andreas Cieslik Profile Picture
    9,267 on at

    Here you find a guide with samples:

    msdn.microsoft.com/.../gg328483.aspx

  • Andreas Cieslik Profile Picture
    9,267 on at

    Example for an account:

    http://myorg.crm.dynamics.com/main.aspx?etn=account&pagetype=entityrecord&id=%7B91330924-802A-4B0D-A900-34FD9D790829%7D

  • Suggested answer
    Andreas Cieslik Profile Picture
    9,267 on at

    Guide for opening with prepopulation of fields:

    msdn.microsoft.com/.../gg334375.aspx

  • Andreas Cieslik Profile Picture
    9,267 on at

    To set values for lookup fields, use the data value, the name value, and for customer or owner lookups only, specify the type value for the respective field. The following sample sets the owner field to a user named “Mark Folkerts”.

    The unencoded value for the extraqs parameter is “ownerid={B8C6E040-656E-DF11-B414-00155DB1891A}&owneridname=Mark Folkerts&owneridtype=systemuser”.

    Sample with prepopulation of lookup field:

    http://myorg.crm.dynamics.com/main.aspx?etn=lead&pagetype=entityrecord&extraqs=ownerid%3D%7bB8C6E040-656E-DF11-B414-00155DB1891A%7d%26owneridname%3DMark%20Folkerts%26owneridtype%3Dsystemuser

  • Suggested answer
    ashlega Profile Picture
    34,477 on at

    Hi,

     you can't do it with the "regarding" lookup:

    msdn.microsoft.com/.../gg334375.aspx

    "You can’t set the values for partylist or regarding lookups."

     What you should, probably, do is:

    - On button click, first create an activity in your C# code (and populate the lookup)

    - Then open that activity using the links Andreas provided

    PS. Or, another option.. add a custom lookup field to the activity, then pass the value to that lookup field, and copy that value to the "regarding" using a workflow/plugin when the activity is saved.

  • Suggested answer
    Rajkumar Rajaraman Profile Picture
    on at

    You can't set regarding field value by passing parameter value to Xrm.Utility.openEntityForm method

    Refer this thread:

    community.dynamics.com/.../145341

  • Community Member Profile Picture
    on at

    Thanks Andreas. But I want to open a new activity with a given lead for example. The lead will be on the regardingobjectid of the activity

  • Andreas Cieslik Profile Picture
    9,267 on at

    Then I agree with Alex. It is not possible with default methods.

    You need to fall back to Alex's suggestions.

    Additional to the last suggested point of Alex you could instead of plugins use JavaScript as well.

  • ashlega Profile Picture
    34,477 on at

    There is an interesting thread here:

    community.dynamics.com/.../676562

    I think it's still "work in progress", but might give you some ideas

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans