本文整理汇总了PHP中Call::set_accept_status方法的典型用法代码示例。如果您正苦于以下问题:PHP Call::set_accept_status方法的具体用法?PHP Call::set_accept_status怎么用?PHP Call::set_accept_status使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Call
的用法示例。
在下文中一共展示了Call::set_accept_status方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Call
$call = new Call();
$call->parent_type = 'Accounts';
$call->parent_id = $account->id;
$call->name = $sugar_demodata['call_seed_data_names'][mt_rand(0, 3)];
$call->assigned_user_id = $account->assigned_user_id;
$call->assigned_user_name = $account->assigned_user_name;
$call->direction = 'Outbound';
$call->date_start = create_date() . ' ' . create_time();
$call->duration_hours = '0';
$call->duration_minutes = '30';
$call->account_id = $account->id;
$call->status = 'Planned';
$call->save();
//Set the user to accept the call
$seed_user->id = $call->assigned_user_id;
$call->set_accept_status($seed_user, 'accept');
//Create new opportunities
$opp = new Opportunity();
$opp->assigned_user_id = $account->assigned_user_id;
$opp->assigned_user_name = $account->assigned_user_name;
$opp->name = substr($account_name . " - 1000 units", 0, 50);
$opp->date_closed = create_date();
$opp->lead_source = array_rand($app_list_strings['lead_source_dom']);
$opp->sales_stage = array_rand($app_list_strings['sales_stage_dom']);
// If the deal is already one, make the date closed occur in the past.
if ($opp->sales_stage == "Closed Won" || $opp->sales_stage == "Closed Lost") {
$opp->date_closed = create_past_date();
}
$opp->opportunity_type = array_rand($app_list_strings['opportunity_type_dom']);
$amount = array("10000", "25000", "50000", "75000");
$key = array_rand($amount);
示例2: Meeting
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
global $json, $current_user;
if ($_REQUEST['object_type'] == "Meeting") {
$focus = new Meeting();
$focus->id = $_REQUEST['object_id'];
$test = $focus->set_accept_status($current_user, $_REQUEST['accept_status']);
} else {
if ($_REQUEST['object_type'] == "Call") {
$focus = new Call();
$focus->id = $_REQUEST['object_id'];
$test = $focus->set_accept_status($current_user, $_REQUEST['accept_status']);
}
}
print 1;
exit;
示例3: testset_accept_status
public function testset_accept_status()
{
$call = new Call();
$call->id = 1;
//test for calls Users and delete the created linked records afterwards
$user = new User();
$user->id = '1';
$call->set_accept_status($user, 'test');
$call_users = $call->get_linked_beans('users', $call->object_name);
$this->assertEquals(1, count($call_users));
$call->delete_linked($call->id);
}