Parameters for functions
When you invoke a function or use function events, you will need to work with the parameters and return value of the function.
Learning about the parameters and return value
There are several ways you can learn about the parameters and return value for a function:
- When invoking a function, the IntelliSense lists the parameters and return value, along with their data types.
- The event arguments passed to the event handler for function events will list the available parameters and return value, along with their data types.
- The Parameters for Microsoft Dynamics GP section of the Microsoft Dynamics GP SDK contains a complete listing of the parameters and return values for the functions in Microsoft Dynamics GP and several integrating dictionaries. The parameter documents in this section of the SDK also list the parameter and return value names, which can be helpful when determining how the parameters and return value are used.
Accessing parameter and return 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 function. You can also access the value returned from the function. Be aware that other applications that integrate with Microsoft Dynamics GP may have changed the values of the parameters or the return value.
Changing parameter and return 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. You can also change the value returned from the function.
Warning: We recommend that you avoid changing parameter and return values in Microsoft Dynamics GP functions. Changing the parameter and return values can signficantly alter the operation of Microsoft Dynamics GP.