Recently, I have been getting a lot of customization requests for Safepay, specifically, adding information into the detail line in the safepay file. Safepay customizations like that are pretty much all the same thing, no matter what field you want to add, so I figured I would share my integration point and how to handle these types of customizations. I have done probably 4 or 5 of these in the last couple of months.
Obviously, the first thing that you want to do is run a script log and script profiler and do some testing, I already did that part, so I won't go through that again here. If you generate a Safepay file, and you want extra data to show up in the detail line, then basically, you want to trigger on the script ME_Configurator_Get_Field_Output. This script determines what the field output will be and passes that field data back. The parameters for the script are:
ME_Configurator_Get_Field_Output Global Procedure{ME_Configurator_Get_Field_Output} in table ME_Configurator_Tables_DTL; in table ME_Configurator_Tables_HDR; in table ME_Upload_Transactions; in currency IN_ChecksTotal, IN_VoidsTotal, INFieldAmount; in long IN_NumberOfChecks, IN_NumberOfVoids; out string OUT_field_output; inout integer IOError; inout string ErrorMessage; inout boolean FromConfigurator;
A few things about this global procedure. First, it is in the Safepay dictionary, so you will need to use Trigger_RegisterProcedureByName() to register a trigger on it. The trigger would be after original. Second, you will need to change the out OUT_field_output parameter to inout so you can set it. Third, you will need to add anonymous to all the table parameters since they don't exist in your dictionary. When you access these tables, you will need to use the column() function to get the data.
All the table buffers are positioned.
The ME_Configurator_Tables_DTL table is the table that holds the detail information of the safepay line being generated.
The ME_Configurator_Tables_HDR is the header table.
The ME_Upload_Transactions is the table that holds the transaction information that the safepay line is being generated for.
Let's assume that the client wants to add an extra field from the cash payment (check) in the Safepay file. Here is the overall design strategy for this type of customization.
That's really all there is to it. Most of the customizations are all very similar. Set up a constant in the configurator and then watch for it to come through in your trigger and change that constant to your data that you want on the safepay file and set the out parameter.
Dave
Posting from DynamicAccounting.net
http://msdynamicsgp.blogspot.com/2010/03/safepay-integration.html
Dave, Thanks for this awesome post! You have thrown light at how to customize Safepay files which is a most common requirement and your tips are very helpful.
PLEASE READ BEFORE POSTING
Please only post comments relating to the topic of this page.
If you wish to ask a technical question, please use the links in the links section (scroll down, on right hand side) to ask on the Newsgroups or Forums. If you ask on the Newsgroups or Forums, others in the community can respond and the answers are available for everyone in the future.