In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the knowledge of "how to get Organization Unit information in C4C and CRM". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
C4C
How to view the organizational unit ID assigned by a user:
You can see the assigned organization name in the Organization Data area of Employee, as shown in the following figure underlined in red:
The requirement now is to use ABSL to obtain the Organization Unit information assigned by the currently logged-in user. For example, if you log in with WANGJERRY37, take out the Department name PMLS shown in the following figure:
Specific implementation: create a new custom BO, and use the field DepartmentName to store the value to be selected:
Then create the AfterLoading script file, using the following code:
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;} CRM
Assuming that the Organization Unit ID assigned by Jerry Wang is 50000732, print out the ID using the following report:
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 = 'Iike. 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.
The final call is this function module:
This is the end of the introduction of "how to get Organization Unit Information in C4C and CRM". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.