Baanboard.com

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

User login

Frontpage Sponsor

Main

Google search


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

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 10th February 2018, 09:27
infatuated01's Avatar
infatuated01 infatuated01 is offline
Junior Member
 
Join Date: Feb 2018
Posts: 4
infatuated01 is on a distinguished road
Baan: 10.5 - DB: sql - OS: window 10
Unhappy AFS Field Value disappeared after putting into Field

Hi,

I am facing a problem that when I put a value into a field using AFS and then use save command, the value that I put disappeared from the field but when I use get.field command from AFS it's still there but after saving it's gone.

P.S. more information in note.

Best Regards,
Kanutm Setasathian
Code:
|**** OUTBOUND.ADVICE = whinh4525m000
|order
stpapi.put.field(OUTBOUND.ADVICE, "whinh225.oorg", str$(whinh200.oorg))
stpapi.put.field(OUTBOUND.ADVICE, "whinh225.orno", str$(whinh200.orno))
stpapi.put.field(OUTBOUND.ADVICE, "whinh225.oset", str$(whinh200.oset))

|order line
stpapi.put.field(OUTBOUND.ADVICE, "whinh225.pono", str$(whinh220.pono))
stpapi.put.field(OUTBOUND.ADVICE, "whinh225.seqn", str$(whinh220.seqn))

|advice
stpapi.put.field(OUTBOUND.ADVICE, "whinh225.sern", str$(advice))

stpapi.put.field(OUTBOUND.ADVICE, "whinh225.locf", str$(whinr140.loca))

|to location
stpapi.put.field(OUTBOUND.ADVICE, "whinh225.loct", "LOD007")

|Item
stpapi.put.field(OUTBOUND.ADVICE, "whinh225.item", str$(whinr140.item))

|Inventory date
stpapi.put.field(OUTBOUND.ADVICE, "whinh225.idat", str$(whinr140.idat))

|advice quantity
stpapi.put.field(OUTBOUND.ADVICE, "whinh225.qads", str$(advised.quantity))
stpapi.put.field(OUTBOUND.ADVICE, "whinh225.quni", str$(whinh220.orun))

|Run
stpapi.put.field(OUTBOUND.ADVICE, "whinh225.runn", str$(run))
ret = stpapi.insert(OUTBOUND.ADVICE, true, error.msg)
Reply With Quote
  #2  
Old 11th February 2018, 23:46
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,040
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Check out this http://www.baanboard.com/baanboard/s...=whinh4525m000 thread to see if it helps. It talks about synchronized dialog.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
Sponsored Links
  #3  
Old 12th February 2018, 12:08
infatuated01's Avatar
infatuated01 infatuated01 is offline
Junior Member
 
Join Date: Feb 2018
Posts: 4
infatuated01 is on a distinguished road
Baan: 10.5 - DB: sql - OS: window 10
Thank for the reply mark.
But I am sorry for lack of information because I already tried synchronized dialog and then I got different sales order that I put in there. More information below.

Input that I put in .
Code:
whinh4201m0i0: Generate Outbound Advice (Knk): oorg : 1 (Sales)
whinh4201m0i0: Generate Outbound Advice (Knk): orno : CSO001281 
whinh4201m0i0: Generate Outbound Advice (Knk): oset : 1
whinh4201m0i0: Generate Outbound Advice (Knk): pono : 10
whinh4201m0i0: Generate Outbound Advice (Knk): seqn : 0
whinh4201m0i0: Generate Outbound Advice (Knk): advice : 1
whinh4201m0i0: Generate Outbound Advice (Knk): warehouse : 5-FG  
whinh4201m0i0: Generate Outbound Advice (Knk): from location : A1101     
whinh4201m0i0: Generate Outbound Advice (Knk): lot : L20170830-001       
whinh4201m0i0: Generate Outbound Advice (Knk): to location : LOD007
whinh4201m0i0: Generate Outbound Advice (Knk): item :          321-DVA                               
whinh4201m0i0: Generate Outbound Advice (Knk): idat : 1504072800
whinh4201m0i0: Generate Outbound Advice (Knk): advised advised : 300
whinh4201m0i0: Generate Outbound Advice (Knk): orun : pcs
whinh4201m0i0: Generate Outbound Advice (Knk): RUN : O20180212001


and 

whinh4201m0i0: Generate Outbound Advice (Knk): oorg : 1 (Sales)
whinh4201m0i0: Generate Outbound Advice (Knk): orno : CSO001281
whinh4201m0i0: Generate Outbound Advice (Knk): oset : 1
whinh4201m0i0: Generate Outbound Advice (Knk): pono : 10
whinh4201m0i0: Generate Outbound Advice (Knk): seqn : 0
whinh4201m0i0: Generate Outbound Advice (Knk): advice : 2
whinh4201m0i0: Generate Outbound Advice (Knk): warehouse : 5-FG  
whinh4201m0i0: Generate Outbound Advice (Knk): from location : B1101     
whinh4201m0i0: Generate Outbound Advice (Knk): lot : L20170830-002       
whinh4201m0i0: Generate Outbound Advice (Knk): to location : LOD007
whinh4201m0i0: Generate Outbound Advice (Knk): item :          321-DVA                               
whinh4201m0i0: Generate Outbound Advice (Knk): idat : 1504075922
whinh4201m0i0: Generate Outbound Advice (Knk): advised advised : 60
whinh4201m0i0: Generate Outbound Advice (Knk): orun : pcs
whinh4201m0i0: Generate Outbound Advice (Knk): RUN : O20180212001
Error that I got when I used synchronized dialog.
Code:
whinh4201m0i0: Generate Outbound Advice (Knk): insert Specified "To Location" not found in "Locations". Enter another "To Location".
whinh4201m0i0: Generate Outbound Advice (Knk): error : Specified "To Location" not found in "Locations". Enter another "To Location".
But I have "LOD007" in database.

Here's my code when I was using synchronized dialog.
Code:
ret = stpapi.synchronize.dialog(OUTBOUND.ADVICE, "add", error.msg) 
if (advised.quantity <> 0 ) then

	
	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.oorg", str$(whinh200.oorg))
	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.orno", str$(whinh200.orno))
	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.oset", str$(whinh200.oset))
	
	

	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.pono", str$(whinh220.pono))
	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.seqn", str$(whinh220.seqn))

	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.sern", str$(advice))
	


	
	|from location
	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.locf", str$(whinr140.loca))
	
	

	
	
	|to location
	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.loct", "LOD007")
	

	|Item
	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.item", str$(whinr140.item))
	
	
	
	
	
	|Inventory date
	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.idat", str$(whinr140.idat))
	
	
	|advice quantity
	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.qads", str$(advised.quantity))
	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.quni", str$(whinh220.orun))
	
	|Run
	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.runn", str$(run))


	
	ret = stpapi.insert(OUTBOUND.ADVICE, true, error.msg)

	advice = advice + 1 
endif

if (not isspace(error.msg)) then

	message("error : " & error.msg)
endif
-----------------------------------------------------------------------
And here's my error when I did not use synchronized dialog.
Code:
	whinh4201m0i0: Generate Outbound Advice (Knk): error : Change the value of the Set field.\n\nReason: Warehousing order header (Sales  / 1) does not exist.
It seems that my whinh225.orno disappeared while inserting data using AFS.

Here my full code when I do not use synchronized dialog.
Code:
|*** Flow Data come from above

if (advised.quantity <> 0 ) then
	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.oorg", str$(whinh200.oorg))
	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.orno", str$(whinh200.orno))
	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.oset", str$(whinh200.oset))



	|order line
	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.pono", str$(whinh220.pono))
	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.seqn", str$(whinh220.seqn))

	|advice
	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.sern", str$(advice))

	|warehouse
	|stpapi.put.field(OUTBOUND.ADVICE, "whinh225.cwar", str$(whinr140.cwar))


	|from location
	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.locf", str$(whinr140.loca))



	|to location
	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.loct", "LOD007")


	|Item
	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.item", str$(whinr140.item))






	|Inventory date
	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.idat", str$(whinr140.idat))


	|advice quantity
	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.qads", str$(advised.quantity))
	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.quni", str$(whinh220.orun))

	|Run
	stpapi.put.field(OUTBOUND.ADVICE, "whinh225.runn", str$(run))





	ret = stpapi.insert(OUTBOUND.ADVICE, true, error.msg)


	advice = advice + 1 
endif

if (not isspace(error.msg)) then

	message("error : " & error.msg)
endif
Sorry In advance .
Reply With Quote
  #4  
Old 12th February 2018, 14:02
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,040
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
My first thought is that you would need the synchronized dialog so that the sessions could communicate with each other. I really do not have any knowledge of your version. But what went through my mind was if that location you are putting to the screen might need to formatted correctly first or have a variable in the domain you need. I know in my case on 4c4 I convert something like "123456" and make in " 123456" - I no longer recall if I had to do that to make it work or if just did it out of habit when writing API code.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
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 13:10
AFS fail to update table field ppchong AFS/DDC/OLE: Function servers 5 26th June 2012 14:38
Compilation Error baansavvy Tools Development 4 20th April 2010 16:25
Update field value i.e. not a form field through AFS! Ankita AFS/DDC/OLE: Function servers 12 18th May 2008 03:06
Problem of Saving View Field using AFS ayushkumar AFS/DDC/OLE: Function servers 5 16th November 2004 23:13


All times are GMT +2. The time now is 10:51.


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