web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Adding a custom table to existing table map

(1) ShareShare
ReportReport
Posted on by 14
Hello,
 
I am trying to add a custom table (Table X) to existing SalesPurchLine map. I have added the SalesPurchLine map to Table X under mappings. Then created new method to return SalesPurchLineInterface() class in the table level. In order to create linking for the new custom table to SalesPurchLineInterface(), I have created a new class be using SalesPurchLineInterfaceFactoryAttribute class for the TableX which extends SalesPurchLineInterface() class. 
 
When I try to run the table method to return SalesPurchLineInterface() class, I am getting "object reference not set to an instance of object error".
 
Has anyone tried this before or can help me with the steps of how to add custom table to existing table map (SalesPurchLine).
  • Verified answer
    Jonas "Jones" Melgaard Profile Picture
    5,017 Most Valuable Professional on at
    You have done all the right things; It's a SysExtensionAppClassFactory cache issue. I have seen it a million times when working with WHS.
    The easiest way (and maybe a bad habit of mine) to clear it from the user interface is to use the "Regenerate methods" on the "Wave process methods" form. You find it under Warehouse Management -> Setup -> Waves -> Wave process methods
     
     
    Alternatively you can call the SysFlushAOD class either using SysClassRunner or System Administration -> Setup -> Refresh elements
     
     
     
  • Verified answer
    Layan Jwei Profile Picture
    8,421 Super User 2026 Season 2 on at
    Hi,
     
    Try to run this link in your browser and then try again
    https://yourEnvironmentUrl/?mi=SysclassRunner&cls=SysFlushAOD

    Check those links


  • AV-17101658-0 Profile Picture
    14 on at
    Hi Layan Jwei and Jonas,
     
    Thanks a lot for sharing the useful links and information and it really worked.
     
    As Jonas rightly mentioned about SysExtensionAppClassFactory cache issue, when I debugged the createInstance() method in SalesPurchLineInterface() class it was not creating the derived class instance and so throwing the null exception.
     
    Now the issue is resolved after running the below command
    https://EnvironmentUrl/?mi=SysclassRunner&cls=SysFlushAOD
     
    Thanks
     
  • Layan Jwei Profile Picture
    8,421 Super User 2026 Season 2 on at
    Hi AV,
     
    I'm glad your issue is fixed. Please don't forget to verify the answers that helped by clicking on "Does this answer your question" tick box

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 532 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 351 Super User 2026 Season 2

#3
CU-1234529-002 Profile Picture

CU-1234529-002 195

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans