19 February 2015

Update AX 2012 Labels through SQL

If you need to replace a word within all  Labels of a layer there is a very easy way using a SQL command:

UPDATE ModelElementLabel
    SET Text = REPLACE(Text, 'Hafen', 'Port')
    WHERE (Module = 'SYP' OR Module = 'SYS') AND Language = 'de'

This SQL command will replace the word 'Hafen' in all Labels of the SYS and SYP layer in german label file with the word 'Port'.

After execution of this command it is required to stop the AOS and delete the *.ald files in the server folder:

C:\Program Files\Microsoft Dynamics AX\60\Server\TWIAX\bin\Application\Appl\Standard

Afterwards restart AOS again.
Post a Comment