Dennis@OTT
12th February 2019, 00:17
Hello,

our item description is a multi language field. We are using French, German, Dutch and English. I want to avoid changing the data language all the time and created as well 4 CDFs for all languages. By changing one of these CDFs I want an Update on the tcibd001.cdscl in the right language. How can I make it happen?

I tried the following code, but it does not work in the user exit:

currlang = ml_get_datalang()
ml_set_datalang("en")

select tcibd001.cdscl
from tcibd001 for update
where tcibd001.item = :v.item.old
as set with 1 rows
selectdo
if tcibd001.cdscl <> tcibd001.cdf_deng then
tcibd001.cdscl = tcibd001.cdf_deng
ml_set_datalang(currlang)
else
ml_set_datalang(currlang)
endif
endselect

Any idea? Or another way?

Thanks and best regards,

Dennis

JaapJD
13th February 2019, 11:39
Don't know whether this should work, but in any case you are missing a db.update(). But if you do this in before.save, there is no need to read the record again, and call the update.
Better is to create a table extension, where you can create an update hook for tcibd001.cdscl. In this hook you do the update based on the CDFs.

vahdani
28th August 2020, 13:41
Hallo Dennis,

did you find a way to do this. I am also looking for a way to change a multi Language field one language at a time per script.

Any help is greatly appreciated! From anyone!