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 :
Microsoft Dynamics CRM (Archived)

How To Set fields When create Appointment using plug-in

(0) ShareShare
ReportReport
Posted on by 894

Hello,

how to set below fields When user create Appointment using plug-in.

1.Populate the Organizer field with the Current User :- Organizer is Party List type

2.Set the Status Reason to Busy

Thanks

*This post is locked for comments

I have the same question (0)
  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi,

    You can refer this article.

    // Set Appointment Organizer

    --------------------
    // Create the activity party
    Entity organizerParty = new Entity("activityparty");
    organizerParty.Attributes.Add("partyid", new EntityReference("systemuser", <id>));
    
    // Add activityparty to partylist
    EntityCollection organizerCollection = new EntityCollection();
    organizerCollection.EntityName = "systemuser";
    organizerCollection.Entities.Add(organizerParty);
    
    // update oranizer on appointment
    Entity updAppointment = new Entity("appointment", <appoinymentid>);
    updAppointment["organizer"] = organizerCollection;
    --------------
    // Set Appointment to busy
    ---------------
    SetStateRequest request = new SetStateRequest(); request.EntityMoniker = new EntityReference(appointment.EntityName, appointmentId); request.State = new OptionSetValue(3); request.Status = new OptionSetValue(5); service.Execute(request);

    ----------------------------

    Refer the below links for more details-

    https://nishantrana.me/2011/05/17/set-organizer-or-working-with-activityparty-in-crm-2011/

    https://msdn.microsoft.com/en-us/library/gg334289.aspx

  • Community Member Profile Picture
    on at

    How to set account name filed When create using plugin ?

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Varsha deshpande Profile Picture

Varsha deshpande 5

#2
JS-09031509-0 Profile Picture

JS-09031509-0 3

#3
Ciprian  P Profile Picture

Ciprian P 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans