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, ...
Answered

Electronic reporting D365 Add Custom function

(0) ShareShare
ReportReport
Posted on by 105

Hi,

I want to add a custom function in ER.(Get Current User)

Like in the docs:

https://docs.microsoft.com/pl-pl/dynamics365/fin-ops-core/dev-itpro/analytics/general-electronic-reporting-formulas-list-extension?toc=/dynamics365/commerce/toc.json

But now the class ERExpressionString don't exist, we have a class ERExpressionStringBase but this class is internal.

I've tried add a interface ERIExpressionString but my function is not visible in ER.

Is function extension are not possible now?

I have the same question (0)
  • Alireza Eshaghzadeh Profile Picture
    14,684 Super User 2025 Season 2 on at

    Hi Krychul,

    Can you elaborate?

    Is there a standard GER config that you are using for this purpose?

  • Krychul Profile Picture
    105 on at

    Hi,

    I creating a new GER config and a requirement is to show a user id that run this report.

    I thought it would be possible on the basis of these docs.

  • Suggested answer
    Alireza Eshaghzadeh Profile Picture
    14,684 Super User 2025 Season 2 on at

    If you define destination for generated report on "Electronic reporting jobs", the user who run the report will be published there as "Created by"

    pastedimage1633099339691v1.png

    For example, standard GER config will be stored on "Electronic reporting jobs" and they will show who create this file.

    Do you want to have user id as field in the report that you have generated? If yes, you can try to add 'User input parameter' on you custom config model mapping and connect this field your report.

    pastedimage1633100564074v2.png

  • Suggested answer
    Arcadi  Profile Picture
    794 on at

    Hi Krychul,

    Extending the default ER functions seems interesting, although for you problem probably there is already an easier way to get current user.

    Anyways what I would do is to take a look at other default functions because it seems the documentation is outdated. For example the class "ERExpressionGetCurrentCompany"

  • Krychul Profile Picture
    105 on at

    Alireza Eshaghzadeh 

    I need to display User Id on my report. The client does not want the parameter because we can choose another user and it should be the one who started the report. The parameter will be added to the report if no other method is found.

    Arcadi  

    I look on this method. method ERExpressionGetCurrentCompany extends ERExpressionStringBase .ERExpressionStringBase  is internal. I've tried to implement a interface ERIExpressionString but function didn't show on the list in ER. 

  • Verified answer
    Alireza Eshaghzadeh Profile Picture
    14,684 Super User 2025 Season 2 on at

    Hi Krychul,

    I understand. In ER config, You can get try to get current user who starts the report from class HcmWorkerLookup.CurrentWorker

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... 456 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 429 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans