Update Freight Cost in Sales Pad Table with Secondary SQL Command Task – SmartConnect
I want to update table in Sales Pad to the add the Freight Cost after updating the GP tables with a SmartConnect Map and this requires me referencing the newly created Sales Document Number. I am using a secondary SQL task to try to do this, but I do not know how to reference the new Sales Document Number just created by the SmartConnect Map.
This is the code I have so far:
INSERT INTO [dbo].[spxSalesDocument]
([Sales_Doc_Num], [xFreightCost])
VALUES ( ‘GlobalRollingColumn’, _FreightCostforTotalOrder);
I am not sure if GlobalRollingColumn is correct to get the Sales_Doc_Num. I am also not sure if I should check the box that reads, “Update global variable with SQL command result?
Michael,
I am not sure if GlobalRollingColumn is correct to get the Sales_Doc_Num.
If you use a GP Rolling Column to get the “next sop number” then yes.
I am also not sure if I should check the box that reads, “Update global variable with SQL command result?
Yes. If you do not, then the value would be empty.
patrick
Actually, i misread the 2nd statement about the checkbox and global.
You are referencing the variable in the SQL Task itself and that SETS the global, it doesn’t use it. You don’t want/care about that.
Instead, the checkbox I was thinking of is on the GP Rolling Column itself there is a checkbox for “use for global variable” and that is the checkbox you want to mark.
Any help that anyone could provide would be greatly appreciated!
Any help that anyone could provide would be greatly appreciated!