Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Poll
How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
15%
200 - 500 GB
28%
500 - 800 GB
4%
800 - 1200 GB
9%
1200 - 1500 GB
9%
1500 - 2000 GB
13%
> 2000 GB
22%
Total votes: 46

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 12th February 2019, 00:17
Dennis@OTT Dennis@OTT is offline
Junior Member
 
Join Date: Oct 2018
Posts: 3
Dennis@OTT is on a distinguished road
Baan: 10.5 - DB: Microsoft SQL Server - OS: Windows
Update Multi language field via script
Baan: ERP LN 6.1 FP11 (Infor ERP 10.5)
C/S: None/Unknown

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
Reply With Quote
  #2  
Old 13th February 2019, 11:39
JaapJD's Avatar
JaapJD JaapJD is offline
Guru
 
Join Date: Sep 2002
Location: Netherlands
Posts: 819
JaapJD will become famous soon enoughJaapJD will become famous soon enough
Baan: BaanIV, BaanERP, ERP LN 6.1 - DB: Oracle, SQL Server - OS: Unix, Windows
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.
Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
AFS field values are not imported to update session balayaswanth Blogs and Web links 1 20th April 2017 14:10
Update calculated form field to table pjohns Tools Development 5 11th October 2013 17:24
Compilation Error baansavvy Tools Development 4 20th April 2010 17:25
Good Practice for storing 'external' source code in BAAN shah_bs Code & Utilities 1 30th July 2008 23:02
Update field value i.e. not a form field through AFS! Ankita AFS/DDC/OLE: Function servers 12 18th May 2008 04:06


All times are GMT +2. The time now is 05:45.


©2001-2018 - Baanboard.com - Baanforums.com