Leading space found on Customer Name when adding a new customer
Hint Ref: 020808050003
Hint Date: 05/08/2008
In versions prior to 126.96.36.199, an issue has been identified where, if Space Manager is set up with no default Customer Title, when a new customer is added, their Full Name, Address Name and Salutation have a leading space.
Whilst this problem has been addressed in later versions, a simple fix is to update the 'Validate Customer' Function (Support/Manage Functions) with the function below (delete the entire contents of the window, before pasting in the new one):
(NOTE: ONLY UPDATE THIS FUNCTION IF YOU ARE NOT CURRENTLY USING THE VALIDATE CUSTOMER FACILITY. If you are using this facility, Please contact RADical Systems so that we can amend your existing function correctly.)
(in icustomerid char(20))
returns long varchar
declare rv long varchar;
update customer set addressname = trim(addressname),fullname = trim(fullname),salutation = trim(salutation),addressname2 = trim(addressname2) where customerid = icustomerid;
(Please Note: This Procedure can be destructive and should only be used by Advanced Users. RADical Systems (UK) Limited or its Partners cannot be held responsible, in anyway, for any consequence of using this or any other Database Function, Procedure or SQL command. Responsibility resides solely with the user.
IT IS HIGHLY RECOMMENDED THAT A FULL AND VALID SPACE MANAGER DATABASE BACKUP IS TAKEN AND VERIFIED AS VALID BEFORE MAKING ANY CHANGES TO THE DATABASE.)