Using PSAResourceTable in Dynamics AX Project Management and Accounting Module

by | Updated August 15, 2016 | Development, Dynamics AX

The PSAResourceTable is used often in the Project Management & Accounting module.  It holds a list of valid worker resources and is used when assigning workers to tasks.  What isn’t immediately clear is how to use it.  The first problem is that it is used like a temp table, but it isn’t defined as a temp table.  Instead, it has a Guid field called UserSesssion that controls who will see the records.  You also won’t easily find any insert statements inserting records into the table.  That is where the ProjProjectResourceList class comes in.  This class is responsible for populating the PSAResourceTable and deleting the records when you are done.

To see this in action you will first need to add some workers as project resources.  Go to Project management and accounting/Common/Project resources/Resources and click the Resource button on the Action Pane.
New Resource


Add a few resources by choosing appropriate values for each field and press OK.  When you are done you should see something like this.

Now we can query the PSAResourceTable for our resources.
private void findResources()


PSAResourceTable resources;

HcmWorker hcmWorker;


ProjIProjectResourceList resourceList;

guid userSession;

utcDateTime startDateTime;

utcDateTime endDateTime;

// This Guid is used to filter the table to just our results.

userSession = newGuid();

// Construct the ProjProjectResourceList

resourceList = ProjProjectResourceList::construct(userSession);

  // These dates are used to filter the workers

startDateTime = DateTimeUtil::getSystemDateTime();

endDateTime = DateTimeUtil::maxValue();


// Populate the PSAResourceTable

resourceList.getResources(startDateTime, endDateTime);


// Now we can query the table for our resources.

while select Resource, ResourceCalendar, ResourceDataArea, LegalEntity from resources

where resources.UserSession == userSession

&& resources.ResourceSet == ProjResourceSet::Cache

  join HcmWorker

where HcmWorker.RecId == resources.Resource




// Our records will remain in the table until we clear them out because this

   // isn’t a real temp table.





Make sure you call clearResources and clearResourceSet when you are finished with the table so you don’t pollute it with orphaned records.

Related Posts

  • I recently came across an issue dealing with project validation in Dynamics AX. Displayed here are a couple setup features in the project management and accounting module and  some tips that might help…

  • Microsoft Dynamics AX 2012 offers robust functionality designed to more effectively manage compensation across entire organizations.  Compensation is managed using compensation plans in combination with eligibility rules to restrict enrollment…

  • Over on the AX Support site on MSDN, Daniel Durrer has taken the time to keep tabs on the latest builds for Microsoft Dynamics AX 4.0, 2009 and 2012.  I…


Submit a Comment

Your email address will not be published. Required fields are marked *

Upcoming Events


14jan11:00 am12:00 pmConfab with Stoneridge - Livestream - Looking Forward: Predictions for Technology in 2021

20jan10:00 am10:30 amThe Modern Manufacturer - Demand Forecasting Functionality

27jan12:00 pm12:45 pmFour Keys to Choosing the Best ERP or CRM Solution: Part 1 – Fit

28jan11:00 am12:00 pmConfab with Stoneridge - Livestream - Ask the Experts!


03feb12:00 pm12:45 pmFour Keys to Choosing the Best ERP or CRM Solution: Part 2 – Platform

10feb12:00 pm12:45 pmFour Keys to Choosing the Best ERP or CRM Solution: Part 3 – Implementation Partner

11feb11:00 am12:00 pmConfab with Stoneridge - Livestream - Live Agents, Power Virtual Agents, Omnichannel – Oh My!

16feb12:00 pm12:45 pmFour Keys to Choosing the Best ERP or CRM Solution: Part 4 – Cost

25feb11:00 am12:00 pmConfab with Stoneridge - Livestream - Surfing Through the Dynamics 365 Wave 1 2021 Release

About Stoneridge
Stoneridge Software is a unique Microsoft Gold Partner, with emphasis on partner. With specialties in Microsoft Dynamics 365, Microsoft Dynamics AX, Microsoft Dynamics NAV, Microsoft Dynamics GP and Microsoft Dynamics CRM, we focus on attracting the most knowledgeable experts in the field to our team, and prioritize delivering stellar solutions with maximum impact for your business. At Stoneridge, we are deeply committed to your results. Each engagement is met with a dedicated team, ready to provide thorough, tailored, and expert service. Based in Minnesota, we intentionally “step into your shoes,” wherever you are. We focus on what you care about, and develop trusting, long-term relationships with our clients.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!