Global Name Change - Customer/Supplier etc with a blank name

Global Name Change - Customer/Supplier etc with a blank name

In versions of Ostendo (Up to and including Update 160) you were able to inadvertently change a key field (eg: Customer or Supplier name) to a blank through the Global Name Change. This of course becomes a big problem and needs fixing ASAP. In order to fix this, create a Standard Script and paste the coding below into it, substituting the NewCode variable with that of the value you wish to use and changing the table SUPPLIERMASTER to the appropriate table for your data (eg: CUSTOMERMASTER).

Later versions of Ostendo now prevent you from changing a key field to a blank.

 

var

 TheOldCode: string;

 TheNewCode: string;

begin
TheOldCode := '';
TheNewCode := 'Electrical Power Company';
ExecuteSQL('Execute procedure GLOBALNAME_TRIGGERS_OFF (''SUPPLIERMASTER'',''' + TheOldCode + ''',''' + TheNewCode + ''')');
ExecuteSQL('Execute procedure GLOBALFIELDNAME_CHANGE (''SUPPLIERMASTER'',''' + TheOldCode + ''',''' + TheNewCode + ''')');
ExecuteSQL('Execute procedure GLOBALNAME_TRIGGERS_ON (''SUPPLIERMASTER'',''' + TheOldCode + ''',''' + TheNewCode + ''')');
showmessage('Finished');
end.

    • Related Articles

    • Mass Global Name Change

      On occasions you may require a global name change to occur across multiple records. eg: you may need 10 customers requiring name changes. A script may be run to read data from a spreadsheet and then process each record in turn. Attached is a Standard ...
    • Dynamic SQL Error when performing a Global Name Change (Apostrophes in the Primary Key)

      If data has been introduced into Ostendo outside of the normal user interface eg: Importing, then in most cases the database will reject the record. The normal Ostendo interface automatically deals with this by changing a ’ to a ` when the record is ...
    • How can I change a Customers or Suppliers Name?

      You can amend many key fields in Ostendo. This is especially useful where your Customer or Supplier has changed their name. To reflect that name change in Ostendo go to File>System Configuration>Global Name Change and select the specific field that ...
    • [MYOB ODBC] - Supplier not found in MYOB

      If you get a message "The Supplier for the Purchase Invoice does not exist in MYOB" even though you have checked they are the same This could be due to 1 of two reasons 1. Ostendo and MYOB allow commas in the Supplier Name but the MYOB-ODBC Driver ...
    • How do I link Images, Documents, etc to a Supplier record?

      You can add Images or Documents to a Supplier record by going into Purchasing>Suppliers and selecting the Supplier. Click on the 'Related' Button on the right of the screen and select 'Supplier Images' or Supplier Documents point the program to where ...