I'd like to make a call to an appointment stored in Dynamics but displayed in Outlook.
Suppose that a user opens a window with said appointment (let's say "call mom"). I've added a button to the ribbon and I'd like it to cause a gender switch upon a click. If the user hits the button, I'd like to
- update the appointment to be "call dad", instead, and
- update some fields that aren't represented in Outlook.
The first part, I think is solvable by changing the text in the open window and allowing the user to store the new, dad-friendly value the usual way - by saving while closing the frame.
However, the second part, needs to be done "under the hood", since there might be no part of Outlook client window that contains value of the corresponding field in CRM Dynamics. As far I can see, I need to create a connection directly to CRM server and write to the field there but I'm not sure how to get the GUID of that certain appointment in order to refer to it on CRM server.
EDIT:
A clarification is needed. The action described will be performed while inside the extra, open frame in Outlook for the regarded appointment. If user double clicks an appointment in the calendar, a window pops out carrying all the info about it. In that window, I need to refer to the currently opened/edited appointment and obtain its GUID for CRM reference. My apologies if it wasn't as clear "on paper" as in my head. :)
xxx.UserData["crmid"].Value
. It's a good practice to use `if(xxx.UserData["crmid"] != null) DoTheCrmMagic();´. – user1675891