本篇內(nèi)容介紹了“C4C和CRM里怎么獲取Organization Unit信息”的有關(guān)知識(shí),在實(shí)際案例的操作過(guò)程中,不少人都會(huì)遇到這樣的困境,接下來(lái)就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!
我們一直強(qiáng)調(diào)網(wǎng)站設(shè)計(jì)、成都網(wǎng)站設(shè)計(jì)對(duì)于企業(yè)的重要性,如果您也覺(jué)得重要,那么就需要我們慎重對(duì)待,選擇一個(gè)安全靠譜的網(wǎng)站建設(shè)公司,企業(yè)網(wǎng)站我們建議是要么不做,要么就做好,讓網(wǎng)站能真正成為企業(yè)發(fā)展過(guò)程中的有力推手。專業(yè)網(wǎng)站制作公司不一定是大公司,創(chuàng)新互聯(lián)公司作為專業(yè)的網(wǎng)絡(luò)公司選擇我們就是放心。如何查看某個(gè)用戶分配的組織單元ID:
在Employee的Organization Data區(qū)域內(nèi)看到分配的組織名稱,如下圖紅色下劃線所示:
現(xiàn)在的需求就是使用ABSL獲取當(dāng)前登錄用戶分配的Organization Unit信息,例如用WANGJERRY37登錄,則取出下圖顯示的Department name PMLS:
具體實(shí)現(xiàn):新建一個(gè)custom BO,使用字段DepartmentName存儲(chǔ)這個(gè)待取的值:
然后創(chuàng)建AfterLoading script file,使用如下代碼:
import ABSL; import AP.PC.IdentityManagement.Global; import AP.FO.BusinessPartner.Global; var queryByIdentityUUID = Identity.QueryByElements; var queryByIdentityUUIDParameter = queryByIdentityUUID.CreateSelectionParams(); var queryByEmployeeBPUUID = Employee.QueryByIdentification; var queryByEmployeeBPUUIDParameter = queryByEmployeeBPUUID.CreateSelectionParams(); if ( this.DepartmentName.IsInitial()){ var id = Context.GetCurrentIdentityUUID().content; queryByIdentityUUIDParameter.Add( queryByIdentityUUID.UUID.content, "I", "EQ", id.ToString() ); var result = queryByIdentityUUID.Execute(queryByIdentityUUIDParameter); var first = result.GetFirst(); // points to identity instance var person = first.Person; var bpUUId = person.UUID.content; queryByEmployeeBPUUIDParameter.Add( queryByEmployeeBPUUID.UUID.content, "I", "EQ", bpUUId.ToString()); var employeeQueryResult = queryByEmployeeBPUUID.Execute(queryByEmployeeBPUUIDParameter); var EmployeeQueryResultCurrent = employeeQueryResult.GetFirst(); var assignedOrg = EmployeeQueryResultCurrent.OrganisationalUnitAssignment.GetFirst(); var org = assignedOrg.ToRoot; // readOnly in AfterLoading event this.DepartmentName = org.NameAndAddress.AddressSnapshot.NameSuitableForLogonLanguage.GetFirst().Name.SecondLineName; }
假設(shè)Jerry Wang分配的Organization Unit ID為50000732,使用下列report打印出這個(gè)ID:
PARAMETERS: id TYPE but000-partner OBLIGATORY DEFAULT '4031140'. DATA: lo_core TYPE REF TO cl_crm_bol_core, lo_collection TYPE REF TO if_bol_entity_col, lo_root_entity TYPE REF TO cl_crm_bol_entity, lv_query_name TYPE crmt_ext_obj_name, lt_selection_parameter TYPE genilt_selection_parameter_tab, ls_selection_parameter TYPE genilt_selection_parameter, ls_query_parameters TYPE genilt_query_parameters, lv_size TYPE i. START-OF-SELECTION. ls_selection_parameter-attr_name = 'PARTNER'. ls_selection_parameter-option = 'EQ'. ls_selection_parameter-sign = 'I'. ls_selection_parameter-low = id. APPEND ls_selection_parameter TO lt_selection_parameter. ls_query_parameters-max_hits = 1. lo_core = cl_crm_bol_core=>get_instance( ). lo_core->load_component_set( 'PROD_ALL' ). lv_query_name = 'BuilEmpAdvancedSearch'. lo_collection = lo_core->dquery( iv_query_name = lv_query_name it_selection_parameters = lt_selection_parameter is_query_parameters = ls_query_parameters ). DATA(lo_result) = lo_collection->get_first( ). ASSERT lo_result IS NOT INITIAL. WRITE: / 'Org unit id: ', lo_result->get_property_as_string( 'ORGEH' ) COLOR COL_NEGATIVE.
最終調(diào)用的是這個(gè)function module:
“C4C和CRM里怎么獲取Organization Unit信息”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識(shí)可以關(guān)注創(chuàng)新互聯(lián)-成都網(wǎng)站建設(shè)公司網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!
網(wǎng)頁(yè)名稱:C4C和CRM里怎么獲取OrganizationUnit信息-創(chuàng)新互聯(lián)
本文地址:http://m.rwnh.cn/article4/iisoe.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供商城網(wǎng)站、品牌網(wǎng)站設(shè)計(jì)、建站公司、企業(yè)建站、自適應(yīng)網(wǎng)站、電子商務(wù)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容
移動(dòng)網(wǎng)站建設(shè)知識(shí)