Procedure methods
Procedures provide the following method:
Invoke()
The Invoke() method is used to run the specified procedure. The parameters for this method will depend on the procedure that is being run. The following table lists the types of parameters for procedures:
Type |
Description |
---|---|
in |
Parameters of type "in" are used only to pass values into the procedure. |
out |
Parameters of type "out" are used only to pass values out of the procedure. |
inout |
Parameters of type "inout" are used to pass values into the procedure, and to pass values out of the procedure. |
Hint: The IntelliSense in Visual Studio will tell you the type of each parameter for a procedure. It will also tell you the datatype of each parameter, such as decimal or string.
For example, the following C# code calls the CheckNoteIdString global procedure. This procedure has one "in" parameter and two "out" parameters. Notice that the out keyword is required for the parameters to which values are returned.
Dynamics.Procedures.CheckNoteIdString.Invoke("Estimate Freight", out isPresent, out formNumber);
You can refer to the Microsoft Dynamics GP SDK for details about the procedures available to invoke. Some procedures in Microsoft Dynamics GP have optional parameters defined. Visual Studio Tools does not support optional parameters. You must supply all parameters for a procedure when you invoke it from Visual Studio Tools.