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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

SharedServiceUnitNotFoundException when trying to import file for a custom data entity in D365FO

(0) ShareShare
ReportReport
Posted on by

Hi everyone,

I'm facing an issue when I'm trying to import a file through code for a custom data entity I've written to import journal lines in D365FO. When I use the same file to import manually through Data management, I works fine.

I have created a batch class that makes use of the FileUploadTemporaryStorageStrategy class. When I click browse and select a file, the OK button gets enables as the file gets uploaded. When I click OK, I get the following exception at the gives lines of code:

Microsoft.DynamicsOnline.Infrastructure.Components.SharedServiceUnitStorage.SharedServiceUnitNotFoundException was unhandled by user code
Message: An exception of type 'Microsoft.DynamicsOnline.Infrastructure.Components.SharedServiceUnitStorage.SharedServiceUnitNotFoundException' occurred in Dynamics.AX.ApplicationFoundation.2.netmodule but was not handled in user code
Additional information: Record for Id - 35K0RCAAF not found.

The lines of code where I hit it are:
 else if (dataSource.Type == DMFSourceType::File && dmfDataSourceProperties.FileFormat == DMFFileFormat::EXCEL)
                {
                    con = DMFXmlGeneration::excleMappingGeneration(fileId,_definitionGrpEntity.ExcelLookUp);
                }

When I debug, I notice something strange:

Thanks in advance for any help on this.

Best regards,

Syed

*This post is locked for comments

I have the same question (0)

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

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
TAHER Mehdi Profile Picture

TAHER Mehdi 3

#2
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#2
Nakul Profile Picture

Nakul 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans