Update the new UDF field for the existing Payment Header records with the CC last 4 digits

SOLVED

Hi,

We are working on a requirement, where we have to update the UDF field for the existing Credit Card Payment records with the last 4 digits of CC before the user clears off the CC details. I am trying to code the same in the VBScript, the Post Validate script on CC_Id compiles correctly with no issues, however, it's not executing it correctly on the fly. Any suggestions/recommendations please share. 

Thanks/AJ

  • 0
    SUGGESTED

    You may need to experiment with the different events for that table and find one that works. I don't mess with CC much inside of sage 100 so i don't have a definitive answer for you but you might need to try the table's pre write event.

    You can always try enabling debug mode and using the trace window to determine whether or not events are firing, if you don't want to bother with the trace window, then use oSession.AsObject(oSession.UI).MessageBox "", "Your message here."

    Also make sure "Allow External Access" is checked on the Preferences tab in Company Maintenance for the target company and syntax check you scripts, any syntax errors will cause your script to fail silently.

  • 0 in reply to David Speck

    Hi

    Thanks for the guidance, our Sales Order data for CC gets integrated into Sage from an external application. 

    While working on the custom script I have tried to use the Post Read on Table and Post write as well, didnot help much. Can we use the Pre write on a specific field for the existing records in the table, please advsie and recommend.

    Thanks/AJ

  • +1 in reply to AJ@Marki
    verified answer

    Pre write occurs when a record is new or has been edited and still allows you to use the oBusObj.GetValue on any field that oBusObj maintains. 

    Just make sure you are targeting the correct table.