locked
globalobjectid of appointment entity RRS feed

  • Question

  • Hi there,

    Appointment entity has an attribute named globalobjectid in which its value gets populated if the appointment is originated from Outlook. However, when the appointment record is created from CRM, the globalobjectid is empty even after synched to Outlook. Is there anyway to generate a valid globalobjectid value when creating appointment record programmatically?

    Regards,

    Henri
    a
    Wednesday, April 29, 2009 5:49 AM

Answers

  • The globalobejctid is created by exchange and is used to uniquely identify all distributed copies. From what I noticed the globalobjectid is only created when you actually send the appointment .

    in other words the CRM web client and the outlook client behavior are identical i.e. the globalobjectid is not created unless you distribute the appointment.

    If you need to automate the distribution of the appointment then you need to create appointment using exchange API (exchange.asmx) which will create the globalobjectid internally and will eventually sync back to CRM.

    You may use a plug-in on the appointment post create and reference exchange.asmx to create the appointment. I also think you will be able to query exchange.asmx for the globalobjectid and save it back to CRM.

    The following URL provides an example (c#) which might help investigate this further:
    http://msdn.microsoft.com/en-us/library/aa563060.aspx

     


    Blog: http://mscrm4ever.blogspot.com/ * Website: http://gicrm.upsite.co.il/
    Wednesday, April 29, 2009 10:14 AM

All replies

  • You might try updating this attribute from within a pre create appointment plug-in or by using the CRM service. If you don’t mind me asking what do you need this attribute for? If this does not work, you can always create a custom attribute and fill it inside a plug-in.


    Blog: http://mscrm4ever.blogspot.com/ * Website: http://gicrm.upsite.co.il/
    Wednesday, April 29, 2009 6:10 AM
  • Yes, I agree the value can be populated in PreCreate event. However, it has to be a valid id value. I have tried with some dummy value and it caused error when synchronising the appointment to Outlook. Actually, i am not even sure if Outlook synchronisation will accept CRM appointments which have globalobjectid field populated. However, Outlook appointment which is synched to CRM will have globalobjectid field populated.

    Sample valid id value: 040000008200E00074C5B7101A82E00800000000E0B9B22ABDC8C901000000000000000010000000BFE80CFDFCD8524DA3C4D8EBC4CC8191

    Situation:
    As we know that attendees do not receive appointment invitation when CRM appointment is synched to Outlook. We have a business requirement to notify attendees about the appointment as if the appointment is created manually from Outlook, then put the appointment into attendees Outlook calendar. Any further changes made to the appointment by Organiser or any attendees shall send email notification to the rest of appointment parties. I did a bit a research and found something called iCalendar which contains an ID (UID) which appears to be the globalobjectid of appointment. Apparently, MS Exchange Server or Outlook uses this ID to identify the appointment sitting in different user's Outlook.

    Problem: How do we generate a valid id for globalobjectid (assuming Outlook synchronisation will accept the id generated)? I saw some posts mentioning IMAPIProp::GetIDsFromNames, but it is in C++. Any idea or other solution?

    Thanks.

    a
    Wednesday, April 29, 2009 6:36 AM
  • The globalobejctid is created by exchange and is used to uniquely identify all distributed copies. From what I noticed the globalobjectid is only created when you actually send the appointment .

    in other words the CRM web client and the outlook client behavior are identical i.e. the globalobjectid is not created unless you distribute the appointment.

    If you need to automate the distribution of the appointment then you need to create appointment using exchange API (exchange.asmx) which will create the globalobjectid internally and will eventually sync back to CRM.

    You may use a plug-in on the appointment post create and reference exchange.asmx to create the appointment. I also think you will be able to query exchange.asmx for the globalobjectid and save it back to CRM.

    The following URL provides an example (c#) which might help investigate this further:
    http://msdn.microsoft.com/en-us/library/aa563060.aspx

     


    Blog: http://mscrm4ever.blogspot.com/ * Website: http://gicrm.upsite.co.il/
    Wednesday, April 29, 2009 10:14 AM
  • Thank you so much for your help. It is indeed very helpful. I just briefly looked at the code in MSDN. It seems we have to impersonate the user credential in order to create the appointment for particular user. I do have an exe which runs at mid nite generating CRM appointments running as CRM user with administrator access. I guess I have 2 options here but both have its own drawback:
    - Creating the appointment via exchange.asmx. Drawbacks: I have to impersonate the user which is not possible. Furthermore, the Outlook appointments generated must be tracked in CRM automatically. I am not quite sure if this is doable programmatically. 
    - Querying exchange.asmx or generate a new globalobjectid. Drawbacks: It seems Outlook synchronisation does not like CRM appointment having globalobjectid field populated. I need to do more testing.

    Any other ideas?

    Again, thank you so much for your help.
    Henri
    Wednesday, April 29, 2009 12:08 PM
  • Why not create the appointment using exchange.asmx, utilize the administrator credentials and then reassign the record to the intended organizer. Using exchange will automatically create the globalobjectid which will be synced eventually / automatically when the user interacts with outlook. 
    Blog: http://mscrm4ever.blogspot.com/ * Website: http://gicrm.upsite.co.il/
    Wednesday, April 29, 2009 8:34 PM