Archive for March 24th, 2009

Pass Through Dex Code and Table Buffer

Tuesday, March 24th, 2009

‘Pass through Dex’ code includes only using tables from the original Dynamics GP dictionary and tables from the Dynamics GP module that you want to include in using the execute command. If you need any other table, you have to submit it to code like the inout table, and you have to do the same for all other fields of that table which are used in this code. Otherwise, the table would not be recognized.

There is an example of ‘pass through Dex’ code. We use table SVC_RTV_MSTR in code, which belongs to the 949 module called in the execute() function and we use our table mxTable which neither belongs to Dynamics GP nor the 949 module.

The tables that will be passed to the procedure will have the address information but will not necessarily have the fields named Name_field, Address_field, like in ‘pass through Dex’ code.

local text code;
local string compile_message;
clear field code;
code = code + “inout anonymous table Table;“;
code = code + “inout anonymous field Name_field;“;
code = code + “inout anonymous field Address_field;“;
code = code + “range clear table SVC_RTV_MSTR;”;
code = code + “release table SVC_RTV_MSTR;”;
code = code + “clear table SVC_RTV_MSTR;”;
code = code + “get first table Table;”;

error_count = execute(949,

code,

compile_message,

table mxTable,

field mxName,

field mxAddress);

if error_count <> 0 then 

warning “Error in pass-through sanscript – ” + compile_message;

abort script;

end if;