Private Address Questions

  • Private Address Questions

    Posted by lholmes@hamamatsu.com on July 26, 2017 at 4:02 pm
    • Lori Holmes

      Member

      July 26, 2017 at 4:02 PM

      Hey all! Ā Some help from you guys, please!

      1. I am trying to determine a way to identify all worker/employee address records and which of those address records are checked as private. Ā Would this effort encompass multiple tables (entity and global)?

      2. I know there are GAB settings which restrict who can view private addresses via entity and role. Ā Is one setting the master? Ā Or can (should) both settings be used together? Ā 

      We are running AX 2012 RTM.

      Thank you so much in advance!

      ——————————
      Lori Holmes
      Hamamatsu Corporation
      LHOLMES@hamamatsu.com
      732-537-3619
      ——————————

    • Jason Carter

      Member

      July 27, 2017 at 10:00 AM

      Hi Lori,

      There’s a IsPrivate field in DirPartyPostalAddressView. You may be able to get what you need by linking HCMWorker to the postal address view and filtering for the private addresses.

      I’ll email you the report. Refresh it on your data, and let me know if it works.

      Thanks,

      Jason

      ——————————
      Jason Carter
      Solutions Enablement – Atlas
      Global Software Inc.
      Fargo ND
      ——————————
      ——————————————-

    • Rick Pierson

      Member

      July 27, 2017 at 9:29 AM

      ?
      As for your first question, the following X++ ‘SQL’ should do the trick if all you want are counts.

      static void jobWorkerAddressCounts(Args _args)
      {
      Ā Ā Ā  LogisticsPostalAddressĀ  logisticsPostalAddress;
      Ā Ā Ā  LogisticsLocationĀ Ā Ā Ā Ā Ā  logisticsLocation;
      Ā Ā Ā  DirPartyLocationĀ Ā Ā Ā Ā Ā Ā  dirPartyLocation;
      Ā Ā Ā  DirPartyTableĀ Ā Ā Ā Ā Ā Ā Ā Ā Ā  dirPartyTable;
      Ā Ā Ā  HcmWorkerĀ Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  hcmWorker;
      Ā Ā Ā 
      Ā Ā Ā  int64 countAddresses;
      Ā Ā Ā  int64 countPrivateAddresses;
      Ā Ā Ā 
      Ā Ā Ā  selectĀ count(RecId)
      Ā Ā Ā Ā Ā Ā Ā  from logisticsPostalAddress
      Ā Ā Ā Ā Ā  join RecId
      Ā Ā Ā Ā Ā Ā Ā  from logisticsLocation
      Ā Ā Ā Ā Ā Ā Ā  where LogisticsLocation.RecId == logisticsPostalAddress.Location
      Ā Ā Ā Ā Ā  joinĀ RecId
      Ā Ā Ā Ā Ā Ā Ā  from dirPartyLocation
      Ā Ā Ā Ā Ā Ā Ā  where dirPartyLocation.Location == LogisticsLocation.RecId
      Ā Ā Ā Ā Ā  joinĀ RecId
      Ā Ā Ā Ā Ā Ā Ā  from dirPartyTable
      Ā Ā Ā Ā Ā Ā Ā  where DirPartyTable.RecId == DirPartyLocation.Party
      Ā Ā Ā Ā Ā  join RecId
      Ā Ā Ā Ā Ā Ā Ā  from hcmWorker
      Ā Ā Ā Ā Ā Ā Ā  where HcmWorker.Person == dirPartyTable.RecId;
      Ā Ā Ā  countAddresses = logisticsPostalAddress.RecId;Ā Ā Ā 
      Ā Ā Ā 
      Ā Ā Ā  select count(RecId)
      Ā Ā Ā Ā Ā Ā Ā  from logisticsPostalAddress
      Ā Ā Ā Ā Ā Ā Ā  where logisticsPostalAddress.IsPrivate
      Ā Ā Ā Ā Ā  join RecId
      Ā Ā Ā Ā Ā Ā Ā  from logisticsLocation
      Ā Ā Ā Ā Ā Ā Ā  where LogisticsLocation.RecId == logisticsPostalAddress.Location
      Ā Ā Ā Ā Ā  joinĀ RecId
      Ā Ā Ā Ā Ā Ā Ā  from dirPartyLocation
      Ā Ā Ā Ā Ā Ā Ā  where dirPartyLocation.Location == LogisticsLocation.RecId
      Ā Ā Ā Ā Ā  joinĀ RecId
      Ā Ā Ā Ā Ā Ā Ā  from dirPartyTable
      Ā Ā Ā Ā Ā Ā Ā  where DirPartyTable.RecId == DirPartyLocation.Party
      Ā Ā Ā Ā Ā  join RecId
      Ā Ā Ā Ā Ā Ā Ā  from hcmWorker
      Ā Ā Ā Ā Ā Ā Ā  where HcmWorker.Person == dirPartyTable.RecId;
      Ā Ā Ā  countPrivateAddresses = logisticsPostalAddress.RecId;Ā Ā Ā Ā Ā Ā Ā 
      Ā Ā Ā 
      Ā Ā Ā  info(strFmt(‘Number of Addresses = %1; Number of Private Addresses = %2’,
      Ā Ā Ā Ā Ā Ā Ā  countAddresses, countPrivateAddresses));
      }

      ——————————
      Rick Pierson
      Braun Intertec
      Bloomington MN
      ——————————
      ——————————————-

    lholmes@hamamatsu.com replied 8 years, 11 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

The discussion ‘Private Address Questions’ is closed to new replies.

Start of Discussion
0 of 0 replies June 2018
Now

Welcome to our new site!

Here you will find a wealth of information created for peopleĀ  that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!