Skip to Content
0
Nov 13, 2019 at 11:06 AM

How to Add/Update the Project Stages using SAP B1 DI-API Service with B1 Integration Framework

724 Views Last edit Nov 13, 2019 at 11:14 AM 3 rev

Hi,

I want to ADD new Stages into an existing Project and also Update existed Stages information in Project Management using SAP Business One DI-API Service with B1 Integration Framework.

This is code I'm using for ADD/UPDATE Stages:

<root>
<Envelope2>
<DiCall>
<Header>
<Action autoCommit="false" DIServiceName="ProjectManagementService" update="updateProject" get="getProject" add="addProject" throwException="false">update</Action>
</Header>

<Body>
<BS>
<GetOrDelete>
<xsl:element name="PM_ProjectDocumentParams">
<xsl:element name="AbsEntry">109</xsl:element>
</xsl:element>
</GetOrDelete>
<InsertOrUpdate>
<PM_ProjectDocumentData>
<AbsEntry>109</AbsEntry>
<ProjectName>update project trow service call</ProjectName>
<PM_StagesCollection>
<PM_StageData>
<LineID>2</LineID>
<StageType>2</StageType>
<StageID>1</StageID>
<Description>Service</Description>
<StartDate>20191111</StartDate>
</PM_StageData>
</PM_StagesCollection>
</PM_ProjectDocumentData>
</InsertOrUpdate>
</BS>
</Body>
</DiCall>
</Envelope2>
</root>


Working with above mentioned code, I'm facing an issue, If I want to update the 3rd LineId related Description filed, then all the stages data get removed, Description updated into LineId 1 and also POS field get changed with new increment number.

I don't want to modify the existed POS information.

Could you please someone suggest, Am I missing anything? Can someone provide the payload structure of xatom and steps.

Thanks,