I am facing the issue with the SOP duplicate document number in GP 2010.When i create an new order the master number is duplicated.I created a stored proc to get the next available master number, but my issue is I don't when and where to call this stored procedure to get the available master number and adding new order to the available number.
Please suggest me on this issue.where to call the stored procedure to get the available master numbers in SOP Entry.
This is NOT SUPPORTED. This is what I use when I must:
DECLARE @NXTMSTNO int
SELECT @NXTMSTNO=NXTMSTNO FROM SOP40100 WHERE DEX_ROW_ID=1
UPDATE SOP40100 SET NXTMSTNO=NXTMSTNO+1 WHERE DEX_ROW_ID=1
This should be done only when others are not in Sales Transaction Entry and not SOP Integration is being done.
Another more supported suggestion is the SPROC in your Company Database:
sopGetMasterNumber @O_iOUTMasterNumber int, @O_iOUTErrorState int
While I know Tim is providing good advice, when ever you do something in the system where the outcome is in question, be sure that you have a good backup prior.
I can not tell you how many times a backup has saved us, when we are certain that nothing could go wrong with what we are doing in SQL.
Just poking my nose in . . .
** Please, if this answers your question, mark it as 'Answered' so others experiencing the same will know it resolved your issue. **
Bill CampbellDirector, OperationsM.I.S. Management Information Solutions Ltd.Skype: billc.edmontonCell: +1 780 994 2455Off : +1 780 481 5564
Thanks for you response.
Actually I am automating the workflows for the GP.In Automation i want to trigger the storedproc to get the master number. My issue is when I need to call this storedproc and how to trigger this.
Please help me out in this.
I am sorry but I don't exactly understand your question, it's your workflow, you know you have to create sales document, then how can anyone of us tell you when to call stored procedure.
almas mahfooz *:-)