Baanboard.com

Go Back   Baanboard.com > Forum > Baan SIGs > AFS/DDC/OLE: Function servers

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
38%
Installation Wizard into new VRC
41%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 37

Baanboard at LinkedIn


Reference Content

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 3rd March 2016, 14:10
frenny's Avatar
frenny frenny is offline
Member
 
Join Date: Oct 2013
Posts: 50
frenny is on a distinguished road
Baan: ERP LN - DB: sqlserver 2012 - OS: winxp
Handle STD Question

Hello ,

My Requirement is to Insert Label in STD Label Session ttadv1140m000,
so I have Write AFS for that session .It is working for New Label with new desc .but if i have insert new Label for Which desc is already Present in some existing session, it will ask one question in std "ttadv11403" , but that Question is not handle in my AFS .I have Tried Question Code at Diffrent Place but still not working for new DESC

|| AFS

stpapi.put.field("ttadv1140m000", "ttadv140.clan", cust.clan)
stpapi.put.field("ttadv1140m000", "ttadv140.cpac", cust.cpac)
ret = stpapi.change.view("ttadv1140m000", err)

ret = stpapi.synchronize.dialog("ttadv1140m000", "add", err)
if ret = 1 then
stpapi.enum.answer("ttadv1140s000", "ttadv11403", ttyeno.yes )
stpapi.put.field("ttadv1140s000", "ttadv140.vers", cust.vers)
stpapi.put.field("ttadv1140s000", "ttadv140.rele", cust.rele)
stpapi.put.field("ttadv1140s000", "ttadv140.cust", cust.cust)

stpapi.put.field("ttadv1140s000", "ttadv140.zc_cont", str$(etol (ttadv.cont.general)))
stpapi.put.field("ttadv1140s000", "ttadv140.desc", str$(trim$(new.label)))
stpapi.put.field("ttadv1140s000", "ttadv140.clab", trim$(f.prefix & str$(get.count)))
stpapi.enum.answer("ttadv1140s000", "ttadv11403", ttyeno.yes )

ret = stpapi.insert("ttadv1140s000",true, err)
if ret then
stpapi.get.field("ttadv1140s000", "ttadv140.desc", get.desc)
stpapi.get.field("ttadv1140s000", "ttadv140.clab", get.clab)
endif
stpapi.end.session("ttadv1140s000")
stpapi.end.session("ttadv1140m000")
endif

I have Also done this by Using DAL - but it will give language error in DAL - i have use 2 as language

switch.to.company(000)
dal.new.object("ttadv140")
dal.set.field("ttadv140.clan", "2")
dal.set.field("ttadv140.cpac", cust.cpac)
dal.set.field("ttadv140.vers",cust.vers)
dal.set.field("ttadv140.rele",cust.rele)
dal.set.field("ttadv140.cust",cust.cust)
dal.set.field("ttadv140.zc_cont",ttadv.cont.general)
dal.set.field("ttadv140.desc",new.label)
dal.set.field("ttadv140.clab", f.prefix)

if dal.save.object("ttadv140") = 0 then
commit.transaction()
else
dal.get.error.message(err)
mess("ltanystr",0,err)
endif

Thank you
Frenny K
Reply With Quote
 


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
Question handling through AFS avin_ln AFS/DDC/OLE: Function servers 18 26th March 2014 06:37
wild cards in Question joepte Tools Development 1 10th May 2012 08:27
Cost Price Vs Std price Babuplus Finance, Invoicing and Integration 0 13th July 2011 02:12
Std cost formula change B4c4-B5c? Paul P Manufacturing & Supply Chain 5 17th March 2003 22:55


All times are GMT +2. The time now is 21:13.


©2001-2017 - Baanboard.com - Baanforums.com