HOWTO: Add invitees to a meeting thru code

sugarcrmdevelopers —  March 9, 2011 — 2 Comments

Prolific forums poster cmacholz provided some very useful code in this post that shows how to add invitees to a meeting via code. The poster’s use-case was a logic hook that created a new meeting that needed to auto-invite a contact that was related to the created meeting.

Here’s the code ( and thanks again to cmacholz for this solution ):

2 responses to HOWTO: Add invitees to a meeting thru code

  1. 

    How we can do for new Meeting record ? for new meeting we don’t have meeting id…

    • 

      Hi,
      Finally I found the solution, for adding dynamically Users in Scheduling (Invitee) need to use bellow JS code.

      e.g.

      //Javascrip Code

      //User “Shyam Gaikwad” is created in Instance
      var data = ‘{“module”:”User”,”fields”:{“id”:”b65b3439-5ef9-04e8-745b-5302f1c3d837″,”full_name”:”Shyam Gaikwad”,”email1″:”shyam@bhea.co.in”,”phone_work”:null}}’;

      var rObj = eval(“(” + data + “)”);
      GLOBAL_REGISTRY.focus.users_arr[GLOBAL_REGISTRY.focus.users_arr.length] = rObj;
      GLOBAL_REGISTRY.scheduler_attendees_obj.display();

      Note: we can execute script in view.edit.php (Meeting Module) in Upgrade safe way.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s