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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Using a Party List as a Lookup for a Quickview Form

(0) ShareShare
ReportReport
Posted on by 5

Hi all,

My goal is to create a quick view for a few fields for our contact record on one of our activities (in this case the phone call).

I can't use the "Call from" because it's a Party List and not a Contact Lookup field.

Any suggestions on the best way to go about this?

Thanks,

Connor

I have the same question (0)
  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    Hi,

    Quick form is only available for the lookup control, partlist can refer may entity that's why it's not available for the party list.

    possible options could be you can build your simple html webresource to show the specific field or can create a lookup field which can be field if Call from is contact using some logic and then show quick view based on the custom lookup field.

  • Verified answer
    Bipin D365 Profile Picture
    28,985 Moderator on at

    Hi,

    Create New Custom lookup field new_contact and set target entity to Contact.

    Add this field on Form and Add quick view form based on this lookup field.

    Now add below code in plugin.

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using Microsoft.Xrm.Sdk;
    
    namespace Microsoft.Crm.Sdk.Samples
    {
        public class PhoneCallCreate : IPlugin
        {
            public void Execute(IServiceProvider serviceProvider)
            {
                // Obtain the execution context from the service provider.
                Microsoft.Xrm.Sdk.IPluginExecutionContext context = (Microsoft.Xrm.Sdk.IPluginExecutionContext)
                    serviceProvider.GetService(typeof(Microsoft.Xrm.Sdk.IPluginExecutionContext));
    
                // The InputParameters collection contains all the data passed in the message request.
                if (context.InputParameters.Contains("Target") &&
                    context.InputParameters["Target"] is Entity)
                {
                    // Obtain the target entity from the input parameters.
                    Entity entity = (Entity)context.InputParameters["Target"];
                    //
    
                    // Verify that the target entity represents an account.
                    // If not, this plug-in was not registered correctly.
                    if (entity.LogicalName == "phonecall")
                    {
                        if (entity.Attributes.Contains("from") && entity["from"] != null)
                        {
                            EntityCollection ecCallFrom = entity.GetAttributeValue("from");
                            if (ecCallFrom != null)
                            {
                                foreach (Entity entityCallFrom in ecCallFrom.Entities)
                                {
                                    EntityReference partyId = entityCallFrom.GetAttributeValue("partyid");
                                    if(partyId.LogicalName=="contact")
                                    {
                                        entity["new_contact"] = partyId;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    

    Now register new Step - Create message , Phone call entity , Preoperation plugin synchronous

    1373.CQ66.PNG

    Please mark my answer verified if i were helpful

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 73 Super User 2026 Season 1

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

#3
11manish Profile Picture

11manish 50

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans