当前位置: 首页>>代码示例>>PHP>>正文


PHP Call::set_accept_status方法代码示例

本文整理汇总了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);
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:31,代码来源:populateSeedData.php

示例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;
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:31,代码来源:SetAcceptStatus.php

示例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);
 }
开发者ID:recci,项目名称:SuiteCRM,代码行数:12,代码来源:CallTest.php


注:本文中的Call::set_accept_status方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。