Tim Tim

SQL Ledger Parts Table Quick Fix For Fedex Ship Manager and Endicia Professional

We extract shipping infomation from SQL Ledger and connect it to Fedex Ship Manager and Endicia Professional via an ODBC connection. Two fields in the parts table we use for overseas customs declaration as a result need to have a not null constraint added to them so they would not be empty when parts are created; our shipping softwares throw an exception when these fields were empty for overseas shipping labels.

The problem with these not null constraints was that they would cause an error when you try to use SL’s save as new feature for new parts. So, here is a quick fix:

1. Go to IC.pm and find this SQL:

“$query = qq|INSERT INTO parts (partnumber)
VALUES (‘$uid’)|;”

2. And change it to:

“$query = qq|INSERT INTO parts (partnumber, countryorigin,
VALUES (‘$uid’, ‘dummy’, ‘dummy’)|;

This should prevent the error and allow you to create the new part with the not null constraint modification on the parts table.

Leave a Comment

Your email address will not be published. Required fields are marked *