cancel
Showing results for 
Search instead for 
Did you mean: 

Potentials with stage history update is not updating

former_member209771
Active Participant
0 Kudos

I all recently I have a requirement of updating Sales Order quotation . I want to add and update lines of sales order stages. And I am using

SAP B1 DI Server API for the same but during update of the quotation it is giving error OPR1 line is already closed.But the first line is not closed

in database the line status is open and from UI also I can upadte the existing row and add a new row. I am attaching the XML data I am pushing into SAP B1 . Please give some solution for this

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member209771
Active Participant
0 Kudos

Hi All,

Any suggestion on this. Please suggest some thing.

Thanks and Regards

Surajit

former_member185682
Active Contributor
0 Kudos

Hi Surajit,

You need separate your action in two parts when you request your DI Server:

First Request: Update the last line.

Second Request: Adds the new line.

The error occurs because you update an line and adds a new line in the same request to the DI server. When you added the new line the previous line is automatically close. How an error is raised all actions are undone, and is because the actions are undone that you can update the line by UI.

Regards,

Diego

former_member209771
Active Participant
0 Kudos

Hi Diego,

Thanks for the reply . But I have a little confusion regarding separate add and update salesopportunities line items. In both case I have to update the salesopportunity but the line items will go in add and update mode but in DI server api what will the structure to send the line items in add and update format.

Thanks and Regards

Utpal Maity

former_member185682
Active Contributor
0 Kudos

Hi Utpal Maity,

In your first request, you should update the item that you wants, and no send others items in your request.

In your second request sends the new item.

P.S: In both situations you call update() method for your sales opportunities.

Hope it helps,

Diego.