Link to home
Start Free TrialLog in
Avatar of pmodiano1
pmodiano1

asked on

Great Plains Integration Manager "SourceFields" confusion

Hi,

I am quite new to MS Dynamics and have been thrust into a situation where I must make a VB.NET app that runs several integration manager scripts.  I got the first one to work and then I looked at the next one:

GetVariable("Conn").Execute "sp_uPostMonthlyAnnuity " & SourceFields("CaseNumber") & ", " & SourceFields("AnnuityID") & _
                              ", '" & SourceFields("DateDue") & "', " &   DestinationFields("Journal Entry#") & ", 'ARD'"

My confusion is with the SourceFields function.  From where is it retrieving the parameters it is sending to this stored procedure?
ASKER CERTIFIED SOLUTION
Avatar of tomHamill
tomHamill
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Forgot to ask, where are you seeing the code you included?
Avatar of pmodiano1
pmodiano1

ASKER

I went into the properties of an integration and saw multiple events to which scripts were attached.  I believe this was the script that was attached to the "After Document" event.
Ok, that makes sense.  The SourceFields object is available in any script within an integration- I just wanted to make sure that you were looking where I thought you were looking.

Anyway, the source queries are listed on the integration properties window that you had open (on your way to the After Doc script).  Any field listed there can be used in any script within GPIM by calling

SourceFields("SourceQueryName.FieldName")

Source Query name is optional.  You only need it if
1) there's more than one source query in the integration AND
2) you're working with either a document level script (like "after document") OR you're working on a destination field script where the destination's source record set does not contain the field/value you want to use.

Although, when in doubt it doesn't hurt anything to use the Source Query Name.