Skip to main content
Answer

Does Acumatica has any method to identify how a record has been created?

  • May 30, 2023
  • 3 replies
  • 315 views

aaghaei
Captain II
Forum|alt.badge.img+10

Hello All,

 

Does Acumatica have any method to identify how a record has been created or is being created? By this I mean whether a record is created by user through UI, an Import Scenario, an API call … or we have to come up with creative solutions? I know in events we have e.External that identifies if UI has made the call or some internal processes but I have not come across entry source identifying methods? Any help is appreciated.

 

@Yuriy Zaletskyy

Best answer by Yuriy Zaletskyy

In the graph itself there are couple of methods ( spelling may be a bit wrong, as typing from the phone ):

1. IsApiCall - you are executed in API context. 

2. IsImport/IsExport - you are in the context of import or export scenario

3. IsCopyPaste - you are in the context of paste

 

As far as I know, context of creation is not preserved in db. 

But if I would need to distinguish, I'd consider using different users for API calls, import/export scenario. Even more, for API call from different sources use different users. I.e. bigcommerceUser, magentoUser. But for CopyPaste context, I don't have much ideas in the morning.

3 replies

Yuriy Zaletskyy
Jr Varsity I
Forum|alt.badge.img+3

In the graph itself there are couple of methods ( spelling may be a bit wrong, as typing from the phone ):

1. IsApiCall - you are executed in API context. 

2. IsImport/IsExport - you are in the context of import or export scenario

3. IsCopyPaste - you are in the context of paste

 

As far as I know, context of creation is not preserved in db. 

But if I would need to distinguish, I'd consider using different users for API calls, import/export scenario. Even more, for API call from different sources use different users. I.e. bigcommerceUser, magentoUser. But for CopyPaste context, I don't have much ideas in the morning.


aaghaei
Captain II
Forum|alt.badge.img+10
  • Author
  • Captain II
  • May 30, 2023

Thank you @Yuriy Zaletskyy 

You are great as always. I will give it a shot and if I could make it work, I will put the methods with correct naming below this post for future reference.


aaghaei
Captain II
Forum|alt.badge.img+10
  • Author
  • Captain II
  • May 30, 2023

@Yuriy Zaletskyy It worked as exactly you pointed out for runtime. For historical purposes, I added a custom text field to save the “Call Methods” into it for future access.