Sdílet prostřednictvím


Parameters for procedures

When you invoke a procedure or use procedure events, you will need to work with the parameters of the procedure.

Learning about the parameters

There are several ways you can learn about the parameters for a procedure:

  • When invoking a procedure, the IntelliSense lists the parameters and their data types.
  • The event arguments passed to the event handler for procedure events will list the available parameters and their data types.
  • The Parameters for Microsoft Dynamics GP section of the Microsoft Dynamics GP SDK contains a complete listing of the parameters for the procedures in Microsoft Dynamics GP and several integrating dictionaries. The parameter documents in this section of the SDK also list the parameter names, which can be helpful when determining how the parameters are used.

Accessing parameter values

In the InvokeBeforeOriginal and InvokeAfterOriginal event handlers, you can use the event arguments to access the values of the parameters that were passed into the procedure. Be aware that other applications that integrate with Microsoft Dynamics GP may have changed the values of the parameters.

Changing parameter values

In the InvokeBeforeOriginal and InvokeAfterOriginal event handlers, you can change the values of "out" and "inout" parameters. The values of "in" parameters cannot be changed.

Warning: We recommend that you avoid changing parameter values in Microsoft Dynamics GP procedures. Changing the parameter values can signficantly alter the operation of Microsoft Dynamics GP.

If a procedure is being processed in the background queue in Microsoft Dynamics GP, the event handler will be passed a copy of the original parameters for the procedure. This means that any changes you make to the parameters will be ignored.