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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

construct() method errors when run in Enterprise Portal

(0) ShareShare
ReportReport
Posted on by 165

Hello all,

I am creating a new excel function in Enterprise Portal since the command button for Excel(static) export doesn't work with View as datasource. And the Dynamic export is unavailable for external users.

I already created a Menu Item that calls a class that will export the excel on selected records, it works well on AX/client side but errors when in Enterprise Portal. 

Classes' RunOn are set to Called from. also tried server but doesn't work.

Is there a way I can construct a class when called from Enterprise portal? 

Error from EP is from below line of code:

application = SysExcelAppliation::construct();

I have the same question (0)
  • Martin Dráb Profile Picture
    237,987 Most Valuable Professional on at

    When you ask in a forum about an error, please always mention the error message. Could you add it now, please?

    Anyway, I think that SysExcelApplication itself is bound to client and I suspect that you don't use it from a session with a client (although I must admit that I don't remember EP very well). Whether your class is set to CalledFrom or Server doesn't change any of that.

  • mrpequit Profile Picture
    165 on at

    Hi Martin,

    The error is just the infolog of the method line in the class (which I included above). No other information.

    Do you happen to know a way to make the function happen in EP? Or should I just reconstruct the form and make the datasource a table instead of view so I can use the command button.

  • Martin Dráb Profile Picture
    237,987 Most Valuable Professional on at

    Try debugging the code - it should tell you more about the error.

    If both my assumptions are true, then you can't run the code from the given place. But you may want to test the assumptions.

    Also, if the whole thing is a workaround of another problem, maybe we should discusss the root problem first. Consider creating a new thread and explaining it there.

  • mrpequit Profile Picture
    165 on at

    Hi, I've tried debugging the code but it won't hit the breakpoint both in AX and Visual Studio. This is the only output I get whenever I receive the error:

    A first chance exception of type 'Microsoft.Dynamics.Ax.Services.XppBridgeException' occurred in Ax32Serv.exe

    A first chance exception of type 'System.ServiceModel.FaultException`1' occurred in Microsoft.Dynamics.AX.Services.QueryService.dll

    A first chance exception of type 'System.ServiceModel.FaultException`1' occurred in System.ServiceModel.dll

    A first chance exception of type 'System.ServiceModel.FaultException`1' occurred in System.ServiceModel.dll

    A first chance exception of type 'System.ServiceModel.FaultException`1' occurred in System.ServiceModel.dll

    A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.ServiceModel.dll

    A first chance exception of type 'System.ServiceModel.CommunicationException' occurred in System.ServiceModel.dll

    A first chance exception of type 'System.ServiceModel.CommunicationException' occurred in System.ServiceModel.Internals.dll

    A first chance exception of type 'System.IO.IOException' occurred in System.dll

    A first chance exception of type 'System.ServiceModel.CommunicationException' occurred in System.ServiceModel.dll

    A first chance exception of type 'System.ServiceModel.CommunicationException' occurred in System.ServiceModel.dll

    A first chance exception of type 'System.ServiceModel.CommunicationException' occurred in System.ServiceModel.Internals.dll

    A first chance exception of type 'System.ServiceModel.CommunicationException' occurred in System.ServiceModel.Internals.dll

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

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 467 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 420 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 241 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans