Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
748 views
in Technique[技术] by (71.8m points)

Acumatica REST API Filter on last modified date

I'm looking to create an integration and need to be able to extract data based on last modified date. I have followed the example provided (Acumatica StockItem example) but the Get always returns all stockitems.

I have modified one stockitem and since the filter in the example is for modified dates greater than a month ago this stockitem should be only one being returned.

Looking at the Content returned the issue would appear to be a "unrecognized" date format, but I have followed the example.

It would appear I'm missing something here but can't figure out what, any advise?

Screen Capture of returned Content

JSON view of StockItem data being returned, modified item CONTABLE1 shows LastModified date of 2021-01-05


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You are passing the value in the wrong format. You need to replace all the special codes like %3A and %2B with corresponding characters.

%3A is :
%2B is -

The below request is working without any issues.

http://localhost/ACU20193/entity/Default/20.200.001/StockItem?$top=5&$filter=LastModified gt datetimeoffset'2021-01-02T00:58:57.837-08:00'

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...