Search the GP Tables
Search by TABLE NAME
Search by FIELD NAME
These are our SOP scripts. All of our scripts for Dynamics GP can be found here
DynDeveloper.com

DynDeveloper.com

Table Edits Forum Articles
Table Edits 0 Table Edits 0 Table Edits 0
Sign Up Now!Log In
Michael Agee 2/11/2017 12:10:45 PM

Pass-Thru Sanscript with SVC_RMA_Update

I am attempting to automate the creation of an RMA via dex customization. I can successfully update fields of the main RMA Entry/Update window but have been unsuccessful creating a line by setting field values in the SVC_RMA_Line_Scroll window via pass-thru sanscript.

 

Hear is the snippet:

                  clear tCode;                                        
                   set sCustomerNumber to 'Customer Number' of table SVC_Serial_MSTR;
                    set sItemNumber to 'Item Number' of table SVC_Serial_MSTR;
                    set sSerialNumber to 'Serial Number' of table SVC_Serial_MSTR;
                    set sReasonCode to "EOS";    
                    set sOfficeID to "DEFAULT";    
                    set sRMAType to "RMA";                        
                    set tCode to tCode + "inout string sReasonCode;";
                    set tCode to tCode + "inout string sCustomerNumber;";
                    set tCode to tCode + "inout string sOfficeID;";
                    set tCode to tCode + "inout string sReturnDocumentID;";        
                    set tCode to tCode + "inout string sItemNumber;";
                                                            
                    set tCode to tCode + "inout string sRMAType;";    
                    set tCode to tCode + "inout string sSerialNumber;";    
                                                                
                    set tCode to tCode + "open form SVC_RMA_Update;";  
                    set tCode to tCode + "run script '(L) New Button' of window SVC_RMA_Entry_DropDown of form SVC_RMA_Update;";  
                    set tCode to tCode + "set 'SVC Return Type' of window SVC_RMA_Entry_DropDown of form SVC_RMA_Update to sRMAType;";
                    set tCode to tCode + "run script 'SVC Return Type' of window SVC_RMA_Entry_DropDown of form SVC_RMA_Update;";
                    set tCode to tCode + "set 'SVC_RMA_Reason_Code' of window SVC_RMA_Entry_DropDown of form SVC_RMA_Update to sReasonCode;";
                    set tCode to tCode + "set 'Customer Number' of window SVC_RMA_Entry_DropDown of form SVC_RMA_Update to sCustomerNumber;";
                    set tCode to tCode + "run script 'Customer Number' of window SVC_RMA_Entry_DropDown of form SVC_RMA_Update;";  
                    set tCode to tCode + "set 'Office ID' of window SVC_RMA_Entry_DropDown of form SVC_RMA_Update to sOfficeID;";
                    set tCode to tCode + "run script 'Office ID' of window SVC_RMA_Entry_DropDown of form SVC_RMA_Update;";
                                       
                    set tCode to tCode + "set 'Location Code' of window SVC_RMA_Entry_DropDown of form SVC_RMA_Update to ""RETURNS"";";
                    set tCode to tCode + "run script 'Location Code' of window SVC_RMA_Entry_DropDown of form SVC_RMA_Update;";    
                                           
                    set tCode to tCode + "set sReturnDocumentID to 'Return Document ID' of window SVC_RMA_Entry_DropDown of form SVC_RMA_Update;";
                    
                
                    set tCode to tCode + "focus field 'SVC Return Type' of window SVC_RMA_Line_Scroll of form SVC_RMA_Update;";
                    set tCode to tCode + "set 'SVC Return Type' of window SVC_RMA_Line_Scroll of form SVC_RMA_Update to sRMAType;"
                    
                    set tCode to tCode + "focus field 'Return Item Number' of window SVC_RMA_Line_Scroll of form SVC_RMA_Update;";
                    set tCode to tCode + "set 'Return Item Number' of window SVC_RMA_Line_Scroll of form SVC_RMA_Update to sItemNumber;";                
                    {set tCode to tCode + "run script 'Return Item Number' of window SVC_RMA_Line_Scroll of form SVC_RMA_Update;";}
                    
                    set tCode to tCode + "focus field 'Return U Of M' of window SVC_RMA_Line_Scroll of form SVC_RMA_Update;";
                    set tCode to tCode + "set 'Return U Of M' of window SVC_RMA_Line_Scroll of form SVC_RMA_Update to ""Each"";";
                    set tCode to tCode + "run script 'Return U Of M' of window SVC_RMA_Line_Scroll of form SVC_RMA_Update;";
                    
                    set tCode to tCode + "focus field 'QTY' of window SVC_RMA_Line_Expansion of form SVC_RMA_Update;";                
                    set tCode to tCode + "set 'QTY' of window SVC_RMA_Line_Expansion of form SVC_RMA_Update to 1;";
                    set tCode to tCode + "run script 'QTY' of window SVC_RMA_Line_Expansion of form SVC_RMA_Update;";

                    
                
                    set tCode to tCode + "set 'Return Serial Number' of window SVC_Serial_Line_Entry of form SVC_RMA_Line_Serial_Entry to sSerialNumber;";
                    set tCode to tCode + "run script 'Return Serial Number' of window SVC_Serial_Line_Entry of form SVC_RMA_Line_Serial_Entry;";
                    set tCode to tCode + "run script '(L) SVC_PB_Insert' of window SVC_Serial_Line_Entry of form SVC_RMA_Line_Serial_Entry;";
                    set tCode to tCode + "close form SVC_RMA_Line_Serial_Entry;";
                    {set tCode to tCode + "run script 'Save Button' of window SVC_RMA_Entry_DropDown of form SVC_RMA_Update;";}
                    
                    if execute(949, tCode, sCompilerError, sReasonCode, sCustomerNumber, sOfficeID, sReturnDocumentID, sItemNumber, sRMAType, sSerialNumber) <> OKAY then
                        error sCompilerError;
                        {13.3}
                        abort script;    
                    end if;    
                       

Are there any dex masters out there that can point out specifically why the code in bold does not update those fields?

 

Thanks

Mike

Version: GP 2013
Section: Dexterity, Dynamics GP








Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
site