Skip to main content
Solved

Occassionally, API call returning null for all Usr fields.

  • September 28, 2023
  • 15 replies
  • 256 views

Forum|alt.badge.img+7

We have an external system that makes REST API calls to the SalesOrder endpoint. Every once in a while the resulting JSon has null for all Usr fields.  I can refresh the data and the result will have all field values.

The other day we added code in the graph extension’s initialization routine to access some custom fields in a setup table.  Then we started to see the occasional error because those calls to GetExtension were failing. But only once in a while. But when they started to fail, they continued to fail, over and over, for a period of time. Sometimes we restarted Acumatica, sometimes the error just went away.

I removed the code from the initialization routine and things were better.

Doing some stress testing today, forcing ACM to send me the GET result from the order over and over, we’d get to a point where the JSon result was showing null values in all custom fields. The base fields still contained data. No change to the underlying transactional data - just sending multiple GET requests with the same http connection.

It’s like the graph extensions didn’t get loaded and thus the various views didn’t know what the custom fields were and so the result was null.

Has anyone seen this happen with the REST API?

Best answer by Dmitrii Naumov

@Django  the  22.213.0010 may also be affected. I’d recommend upgrading to at least 22.215.0056.

15 replies

Forum|alt.badge.img+7
  • Author
  • Captain II
  • September 28, 2023

Update:

I have have two of my windows open. If I press F5 to force a requery on one screen and before it finishes, I press F5 on the other, I’ll get the erroneous query results, but only on one of the calls.

And the time for these bad result sets is very quick.


RohitRattan88
Acumatica Moderator
Forum|alt.badge.img+4
  • Acumatica Moderator
  • September 28, 2023

@Django 

I am currently working on a related issue. It is still under investigation, and I will probably have some findings to share in a week or two.


Forum|alt.badge.img+7
  • Author
  • Captain II
  • September 28, 2023

Thank you @RohitRattan88 - let me know if I can help in any way.


Forum|alt.badge.img+7
  • Author
  • Captain II
  • September 28, 2023

Just to add some more details. I notice that the Request Profiler indicates that the SQL Count column is a little more than double what it should be when the error happens.

 


RohitRattan88
Acumatica Moderator
Forum|alt.badge.img+4
  • Acumatica Moderator
  • September 29, 2023

Thank you @RohitRattan88 - let me know if I can help in any way.

@Django thank you for offer. I will reach out to you if needed

Just to add some more details. I notice that the Request Profiler indicates that the SQL Count column is a little more than double what it should be when the error happens.

 

that is interesting. thanks for pointing it out.


Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • September 29, 2023

@Django which version are you trying with?

We had a similar issue in some 22r1 versions. 

 

If you are on something like 22r1 Update 15, I recommend you to upgrade to the latest 22r1 and try again.


Forum|alt.badge.img+7
  • Author
  • Captain II
  • September 29, 2023

@RohitRattan88 - yes, I noticed this. I have the Request Profiler results for a successful result and an unsuccessful result. When the issue appears, the Note table is queried by itself multiple times but when the process works the Note table is never queried by itself.  I’m going to document the differences between a good result and a bad result so that’s available.

@Dmitrii Naumov - this is version 22.213.0010

As I said, I can reproduce this at will and it is on the acumatica.com saas environment, so if I can help, I’d be happy to assist.


Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • Answer
  • September 29, 2023

@Django  the  22.213.0010 may also be affected. I’d recommend upgrading to at least 22.215.0056.


Forum|alt.badge.img+7
  • Author
  • Captain II
  • September 29, 2023

@Dmitrii Naumov - In our saas sandbox environment we upgraded to 22.218.023.  I’ve sends hundreds of async requests through the API over the course of a couple of minutes

100% success rate.

Thank you for the suggestion!

I did notice that the profiler indicates rows with higher SQL counts but the proper data is being returned.

@RohitRattan88 Just in case it helps your investigation, on 22.213, when I had failures, the details under the Logged SQL Count column included a high number of calls to the Note table (screenshot below). But, when I had successes - there were zero calls that only were for the Note table. (But success and failures make calls to Note,NoteDoc,SOLine, etc)

After the update to 22.218 even my high Logged SQL Count data does not include any calls that are only to the Note table.

 


RohitRattan88
Acumatica Moderator
Forum|alt.badge.img+4
  • Acumatica Moderator
  • September 29, 2023

@Django great. thanks for sharing your findings.


Forum|alt.badge.img+3
  • Captain I
  • October 14, 2024

@Django I am having the same problem. Trying to retrieve the UDF on customer screen but udf values are still null. My build is 22.218.0023 but still not success. 22R2

 

Any suggestions on how and what to do to get the UDF values even it is present .
 

https://localhost/entity/Default/22.200.001/Customer?$filter=CustomerID eq '000002'&$custom=Baccount.AttributeAGDCRAN

 

 


Forum|alt.badge.img+7
  • Author
  • Captain II
  • October 14, 2024

@tahayabali  Can you remove the $custom=BaccountAttributeAGDCRAN from the request and replace it with:

$expand=Attributes

Just to see what comes back?


Forum|alt.badge.img+3
  • Captain I
  • October 14, 2024

@Django It returns the Attributes but not the user define fields. The custom is empty after this call. But $custom=BaccountAttributeAGDCRAN returns custom dict but with null values

 


Forum|alt.badge.img+3
  • Captain I
  • October 15, 2024

@Django and @Dmitrii Naumov any suggestions?

 


Forum|alt.badge.img+3
  • Captain I
  • October 15, 2024

.