cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to patch a journal entry adding more lines using the service layer?

albertosilva
Explorer
0 Likes
740

I'm trying to patch an existing journal entry, created automatically from a "Goods Issue" (InventoryGenExit), which has two lines which I need to edit and add two more lines, using the service layer, but it always return a "-5002 - Invalid number of rows" error message. 

I've tried to set the Line_ID and the DocumentLine incrementally on each line or leave them as null, always getting the same error. The error is not returned if no new lines are added.

SAP Business One, version for SAP HANA 

 

Accepted Solutions (0)

Answers (1)

Answers (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi albertosilva,

Are you allowed to update the same Journal Entry manually using SAP Business One client? I feel that the system will not allow you to update it manually also.

If it is the case, the same cannot be updated via DI or Service Layer also.

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

 

albertosilva
Explorer
0 Likes

Hello,

Thank you, that makes sense, still I would expect a more meaningful message if that is the reason...