Solved

How to save the name of the person that printed a specific report inside a user field?


Userlevel 3
Badge

Hello!

On some of our projects we have custom made Reports where it is essential to know who printed it, in case one of them gets lost within the warehouse. We added the Report via Workflow Automation “Run Report” Action with the Customization Project Editor and would now like to attach a “Field Update” to it, that saves the Display Name of the Person clicking on the action into a userfield called “SOOrder.DocketPrinted”.

Has anyone an idea or solution to this?
Greetings

icon

Best answer by Naveen Boga 18 March 2022, 14:11

View original

10 replies

Userlevel 7
Badge +18

@jwestermann17  Hoping that below link will help you on your requirement.

https://www.augforums.com/forums/acumatica-analytical-report-manager-financial-report-writer/printing-the-username-on-a-report/

Userlevel 3
Badge

@Naveen B Correct me if i am wrong, but i can’t use the =Report.GetDefUI('AccessInfo.DisplayName') formula into a “field update” variable, as it would throw a error that “Report” is not avaiable in this context. I don’t need the name of the User who ran the report on the report, but rather on the sales order screen. 

I need something, that i can use within a action.

DocketPrinted Checkbox
DocketPrinted Date
DocketPrinted DisplayName
 

Userlevel 7
Badge +18

Sorry, I was thinking that you wanted to display the username in the reports.

I don’t think we can provide the Username here, as an alternative you may need to introduce the field, and when you the field from Workflow automation and then display the Username in the newly introduced field.

Userlevel 3
Badge

Sorry, could u explain what you mean with “introduce the field, and when you the field from Workflow automation and then display the Username in the newly introduced field.”?
I couldn’t really follow.

Userlevel 7
Badge +18

Hi @jwestermann17 According to me, it requires a small piece of customization. Please find the details below.

Introduce below 2 fields.

  • Checkbox Type of field (unbound field)
  • Textbox type of field (Where you can show the Username)

From workflow automation, you can update the checkbox type of field and in the graph write a FieldUpdated Event for the checkbox field and write a logic to show the current login username (AccessInfo.Username) in the Textbox field.

 

Let me know if you have any queries and hope this helps!!

Userlevel 3
Badge

Hi @Naveen Boga

Would u be able to provide a Example Customization / Code?
I have tried for several hours and could not accomplish the goal of writing the Username inside the Textbox field with your helpful explanation.


 

Userlevel 7
Badge +18

@jwestermann17 Sure will work on this provide the sample example tomorrow for reference.

Userlevel 7
Badge +18

Hi @jwestermann17  I’m not sure, If this fulfills your requirement, but here is a sample example and attached the package you can deploy and verify in your instance.

Eg: As I said above, In the Sales Order screen, I have created the below 2 fields.

  • Checkbox field
  • Textbox field

When I’m Cancelling the Sales Order, I’m checking this checkbox. As soon as we check the checkbox it will show the current logged-in user in the Textbox field.

 

Please find the screenshots for reference.

 

 

 

 

Userlevel 3
Badge

Hello @Naveen Boga,
this helps a ton! Thank you very much.

Can i somehow, instead of the Username, get the DisplayName?
I noticed “GetDisplayName” doesn’t work.

Userlevel 7
Badge +18

Hi, @jwestermann17   You can use the below code to get the Display Name, and Hope this helps!!

 

Base.Accessinfo.DisplayName;

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved