REST API PartTrans method Gea Not Working

help please, I need get data from parttran how parse sysdate parametr?

try ’ ’ around the date

Thanks Aaron but same result when I set the date like 2022-07-20 the response is Sorry! Something went wrong. Please contact your system administrator.

Did you try wrapping the date as it existed in your post with the single quote marks? I’ll have to double check but since it’s expecting a string, it might need to be explicit string.

Yes I put ‘2022-08-20T16:41:23.089Z’ and ‘2022-08-20T16:41:23.089’ with out Z I try ‘2022-08-20’ same result the method is getByID, a simple Get with parameters is OK, But I need getByID to do a patch in ud Field.

Did you try double quotes around it?

I’m not that familiar with the REST calls, but why would it even need the SysDate and SysTime? Doesn’t the Company + TranNum identify a unique partran record?

Also, if string parameters need to be enclosed in single or double quotes, shouldn’t the Company parameter need them too?

2 Likes

I would try this. First click here at the top of the page:

Then expand out “/GetByID”:

In the json input I would put in the following:

{
  "sysDate": "2022-07-20",
  "sysTime": 48464,
  "tranNum": 18297899
}

A long time ago, I added a UD Field to a different historical table (ProjCst?) and the Business Object would not accept an Update - even for just a UD Field. And since REST is just a wrapper… Since then, I’ve avoided UD fields on historical tables like ProjCst, PartTran, and the Booking tables. I also avoided UD fields on PartTran since now the view has to read two tables for each query. Normally, the performance on PartTran is bad enough. YMMV.

If you are stuck with this solution, you may be able to write an an Epicor Function that does the get on PartTran then uses Key to the PartTran_UD table and then you would update the UD Field in Custom Code.

I believe the PartTran Bo is actually called PartTranSeach and it does not implement full CRUD only retrieve/search

PartTran is one of those tricky tables that Epicor discourages you from messing with.

Like Mark said look into a function if you must

Create Parameterized BAQ of PartTran and try API of BAQ.

1 Like

Thanks @fakhruddin @Aaron_Moreng , @ckrusen, @Mark_Wonsil and @josecgomez
That’s exactly what I did.

Save a record in the UD38 table with the information from PartTran, I created the BAQ by linking ud38 with PartTran and I only show the PartTran records that have no record in UD38, I create this from an android app when the materials are physically delivered and the user receipt signature,

image