Hi,
Current user Address will be stored in Employee BO and You can make use of following code to fetch the Address Related information from Employee BO.
import ABSL; import AP.Common.GDT; import AP.FO.BusinessPartner.Global; import AP.PC.IdentityManagement.Global; var new = Identity.Retrieve(Context.GetCurrentIdentityUUID()); if (new.IsSet()) { var ID = new.BusinessPartnerUUID.content; if ( !ID.IsInitial()) { var BP = BusinessPartner.Retrieve(new.BusinessPartnerUUID); if ( BP.IsSet()) { var EMP_ID = BP.Identification.GetFirst().BusinessPartnerID; var emp : EmployeeID; emp.content = EMP_ID; if (!EMP_ID.IsInitial()) { var res = Employee.Identification.Retrieve(emp); if (res.IsSet()) { var data = res.ToRoot.CurrentDefaultEmployeeWorkplaceAddressInformation; if ( data.IsSet()) { var city = data.EmployeeWorkplaceAddressOrganisationAddress.DefaultPostalAddressRepresentation.CityName; } } } } } }
Thanks
Saurabh
Add comment