RollBackSopNumber Method

Use this method to return unused sales order numbers. This makes the numbers available for use with other Microsoft Dynamics GP SOP documents.

Class

Microsoft.Dynamics.GP.eConnect.GetSopNumber

Syntax

public bool RollBackSopNumber(
	string sopNumKey, 
	int sopTypeKey, 
	string docIdKey, 
	string connString
)

Parameters

[spacer]

Name

Data type

Description

sopNumKey

string

Specifies the number to return to Microsoft Dynamics GP

sopTypeKey

string

Specifies the type of the document:

1 = Quote

2 = Order

3 = Invoice

4 = Return

5 = Back order

6 = Fulfillment order

docIdKey

string

Specifies the document ID

connString

string

Specifies the SQL server and database


Return Value

Type: bool

This method returns a boolean value that indicates whether the rollback request was successfully completed. A value of True indicates the rollback was successful.

Examples

The following segment of Visual Basic .NET code uses the RollBackSopNumber method to make an unused SOP number available in Microsoft Dynamics GP:

Dim ConnectionString As String
Dim SopNumber As String

'Set the connection string
'This connection string uses integrated security to connect to the 
'TWO database on the local computer
ConnectionString = "Data Source=localhost;Integrated
Security=SSPI;" _ 
	& "Persist Security Info=False;InitRoial Catalog=TWO;"

'Instantiate a GetSopNumber object
Dim SopNumberObject As New GetSopNumber

'Get the next sales invoice number
SopNumber = SopNumberObject.GetNextSopNumber(3, "STDINV",
ConnectionString)

'Return the sales invoice number to Microsoft Dynamics GP
SopNumber = SopNumberObject.RollBackSopNumber(SopNumber, 3,
"STDINV", _ 
	ConnectionString)

See Also

GetNextSopNumber Method

 


Documentation Feedback