Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

eConnect SOP Issues, Questions, Discussion...

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

I'm working on a sales order integration with econnect and am having issues updating transactions with serial numbers or manually set taxes... Any suggestions?

Also, I am using the .net classes to run the econnect integrations, is it faster to run the stored procedures instead since I'm always connected and close to SQL anyway? If so, how do you do an sop transaction with all its parts? do you insert the header first and then the lines, serials, payments, taxes etc after? wont econnect say that the numbers are out if you insert the header without lines?

So far I have delt with serial numbers by deleting all the relevant lines from SOP10201 and updating SOP10200 right before I run my update through econnect, then econnect puts them all back thinking they are newly selected and it works great.

Dim SqlSerialDelete As String = <string>
IF EXISTS(SELECT LNITMSEQ FROM SOP10200 WHERE SOPNUMBE='{0}' AND SOPTYPE={1} AND LNITMSEQ={2} AND CMPNTSEQ={3} AND ITEMNMBR='{4}')
BEGIN
	UPDATE SOP10200 SET QTYFULFI=0 WHERE SOPNUMBE='{0}' AND SOPTYPE={1} AND LNITMSEQ={2} AND CMPNTSEQ={3} AND ITEMNMBR='{4}'
	IF EXISTS(SELECT SERLTNUM FROM SOP10201 WHERE SOPNUMBE='{0}' AND SOPTYPE={1} AND LNITMSEQ={2} AND CMPNTSEQ={3} AND ITEMNMBR='{4}' AND SERLTNUM='{5}')
	BEGIN
		DELETE FROM SOP10201 WHERE SOPNUMBE='{0}' AND SOPTYPE={1} AND LNITMSEQ={2} AND CMPNTSEQ={3} AND ITEMNMBR='{4}' AND SERLTNUM='{5}'
		IF EXISTS(SELECT SERLNSLD FROM IV00200 WHERE ITEMNMBR='{4}' AND LOCNCODE='{6}' AND SERLNMBR='{5}')
			UPDATE IV00200 SET SERLNSLD=0 WHERE ITEMNMBR='{4}' AND LOCNCODE='{6}' AND SERLNMBR='{5}'
	END
END
</string>.Value

Dim strSQL As Atring = String.Format(SqlSerialDelete,
   SOPNUMBE, SOPTYPE, LNITMSEQ, CMPNTSEQ, ITEMNMBR, SERLTNUM, LOCNCODE)

The "Update manual tax" issue...

If I set the tax values manually and insert with econnect it works.
Then, if I update the same transaction with the same data (no changes) it fails saying it cant update manually set taxes. However, If generate the taxes to be the same as they would be if econnect generated them (following all the rules) then it will not error.

SO far my best solution would be to update SQL after econnect does, and set the (one specific) taxes manually. However, starting to code this procedure I have quickly realized this is going to be a bit of a daunting task... Particularly updating all the totals to reflect the changed tax amount, then thinking about it, what if the document is fully paid, but the auto tax says its more than what it should be when its manual, I guess this will be better than the other way, econnect probably wont allow a document to have more payment then docamount....

Is there a procedure I can run outside of GP that will automatically update an SOP transactions totals and distributions by actually doing the math?

ARG, suggestions? discussion?

*This post is locked for comments

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans