👩‍💻 Check out our latest job positions here 👈 or send us a PM for more info.

Meetings - Accept Status modifications

Hello!

It would be awesome to make some of modifications in the meetings module:

  1. Be able to modify the accept status from the website. Since sometimes confirmations are being done through phone calls.
  2. Whenever a user already has a confirmation status (either accept, decline or tentative) do not send an invitation email again. For example: Adding new contacts to an existing meeting will resend to confirmed contacts.
  3. Do contacts with decline status still receive a reminder? after they already declined? It would be good that users with decline status don’t receive any reminder.

Best regards,

Chris

Hello,
1 and 2 is easy. i don’t know 3.
for 1 :

in detailviewdefs of meetings


    'includes' => 
      array (
        0 => 
        array (
          'file' => 'custom/modules/Meetings/accept_decline.js',
        ),
      ),

The content of accept_decline.js



function accept(url) {
	//alert('accept');
    if (url) {
        $.ajax({
            url: url,
            success: function() {

            // Reload subpanel
            	showSubPanel('contacts', null, true);
        	}
    	});
	}
}

function decline(url) {
	//alert('decline');
    if (url) {
        $.ajax({
            url: url,
            success: function() {

            // Reload subpanel
            	showSubPanel('contacts', null, true);
        	}
    	});
	}
}

function ajaxRequest(url) {

    if (url) {
        $.ajax({
            url: url,
            success: function(result) {
				YAHOO.SUGAR.MessageBox.show({msg: result} );
            // showSubPanel('contacts', null, true);
            	showSubPanel('dio_prestations_meetings', null, true);
            	showSubPanel('dio_sisdprestations_meetings', null, true);
            	
        	}
    	});
	}
}

in contact module : metadata meeting_subpanel_contact


  array (
    'vname' => 'LBL_NEW_FIELD',
    'widget_class' => 'SubPanelDioAccept',
    'width' => '5%',
    'custom_link_only' => true,
    'displayHeaderCell' => false,
    'default' => true,
  ),

in include generic the widget :



<?php

if (!defined('sugarEntry') || !sugarEntry)
    die('Not A Valid Entry Point');

class SugarWidgetSubPanelDioAccept extends SugarWidgetField {

    function displayHeaderCell(&$layout_def) {
        return '&nbsp;';
    }

    function displayList(&$layout_def) {
        global $app_strings;
        global $subpanel_item_count;
        $unique_id = $layout_def['subpanel_id'] . "_edit_" . $subpanel_item_count;


        $accept = 'index.php?entryPoint=acceptDecline'
        		. '&module=Meetings'
        		. '&contact_id=' . $layout_def['fields']['ID']
        		. '&accept_status=accept'
                . '&record=' . $_REQUEST['record'];
        $decline = 'index.php?entryPoint=acceptDecline'
        		. '&module=Meetings'
        		. '&contact_id=' . $layout_def['fields']['ID']
        		. '&accept_status=decline'
                . '&record=' . $_REQUEST['record'];


		$toreturn = '<img src="/themes/default/images/accept_inline.gif" onclick="accept(&quot;' .$accept .'&quot;)">&nbsp;';
		$toreturn .= '<img src="/themes/default/images/decline_inline.gif" onclick="decline(&quot;' .$decline .'&quot;)">&nbsp;';


            return $toreturn;
  
    }

}


Please note, you must certainly correct the path of icons accept_inline.gif and decline_inline.gif

For 2 :
It’s easy to create a custom action in meeting, load relationship contact, loop and send basic email. (i dont know how use a template)
Maybe correct the original send invite button ?

Regards

Thanks for yuor prompt response!

Regarding question 1)

I followed step by step your guide. I don’t see any changes other than no title in Accept Status in the Contacts subpanel in Meetings.

I don’t see where I can change the accept status.

  1. I didn’t followed you, can you explain me more please.

Thanks a lot!

Hi,

For 1

Have you do quick repair rebuild ?
Have the js file loaded in detail view of meeting
The name of the widget is SugarWidgetPanelDioAccept.php
Don’t see icons like this ?

If not, write what you do and path, and filename. and content.

For 2 … first 1 closed :wink:

Edit : forget first line ‘dio_accept’ =>


  'dio_accept' => 
  array (
    'vname' => 'LBL_NEW_FIELD',
    'widget_class' => 'SubPanelDioAccept',
    'width' => '5%',
    'custom_link_only' => true,
    'displayHeaderCell' => false,
    'default' => true,
  ),

1 Like

Thanks a lot!

Whenever a user already has a confirmation status (either accept, decline or tentative) do not send an invitation email again. For example: Adding new contacts to an existing meeting will resend to confirmed contacts.

I also want this functionality , for am meeting if contact has already accepted the meeting , then email invitation will not resend anyhow,