chardy
26th January 2006, 16:48
Hi,
In Baan IV (with transport package), when manuelly creating a sales order line, it is possible to calculate the receipt date by typing "ctrl shift R" in the receipt date field.
Now, I want to create my order line with AFS.
I don't know my receipt date and I want Baan calculates it.
How can I do this?
Which AFS command can do the "ctrl shift R" action?
Any idea?
Thank you
mark_h
27th January 2006, 05:20
Check the form and see if it is a user defined option. The you might be able to use stpapi.application.option.
chardy
30th January 2006, 10:44
Thx Mark,
I shall check.
chardy
30th January 2006, 17:51
There is no specific option in the form.
But there is something in the field definition.
Now, how can I "put" the value in api mode?
In the script, the data is retrieve in the in.ret variable which is useable in on.input event, not in check.input, when.field.changes,...
Is the stpapi.put.field can be used?
lbencic
30th January 2006, 17:55
If there is no option under the application/specific pull down, - basically no 'Form Command' for the action, then the AFS will have a problem getting to that functionality. I think this is what is documented in the Developer's Guide for AFS - under 'Hidden Functionality'
"The AFS cannot reach functionality that is only accessible through zooming on a field level....."
chardy
30th January 2006, 18:06
Thx,
What a very bad news.
This means that I need to calculate my date before to send it to the session.
I need to do the same thing that the session do.
Lukely, I have the source code.
This is wasted time.
mark_h
31st January 2006, 00:10
With source code other options are available. To do something like this I created my version to specifically call a subsession to do what I wanted. I do not own source, but this was a work around. Since you have source you could always create a button to execute this code and put that on the form. I am sure there are other possibilities but those were the first two to jump into my mind.
chardy
31st January 2006, 10:03
I do not want customize the form to add a new function.
Well, I shall take the source code corresponding to ctl-shift-R action (it is in a include function) and put it in my own session. I did not want to calculate the date, but I think there is no other way.