gget79
24th January 2008, 15:03
Hi,
I am working with Baan Vc.
I want to know:
Which values are they possible in api.mode variable?.
What does it means each one?.
The question is for that I have been to looking in the BaanBoard, but only find some values 0 and 1, but in the program that I am doing, I found that variable can take a value 2.
Greetings,
mark_h
24th January 2008, 15:24
With API mode you should always check it against true and false. I had this discussion with Baan Support. I can not remember the exact answer, but you should not check it for values. I believe they(but don't hold me to this) said in Baan that 0 is always false and everything else is always true. I could have that backwards, but I have since then treated boolean variables differently - I always use "if api.mode then" or "if not api.mode then".
gget79
24th January 2008, 15:47
With API mode you should always check it against true and false. I had this discussion with Baan Support. I can not remember the exact answer, but you should not check it for values. I believe they(but don't hold me to this) said in Baan that 0 is always false and everything else is always true. I could have that backwards, but I have since then treated boolean variables differently - I always use "if api.mode then" or "if not api.mode then".
Hi Mark,
Then I have a serious problem, because I am trying a AFS function to Sales Ordres when the order type is collect order, then the process of warehousing or invoicing in this case the variable take a value 2. Then I needed to know in what other cases could pass this?
mark_h
24th January 2008, 16:58
I am not sure I understand - you should not need anything other than true or false for api.mode. Yes - you might have to do mutliple checks for order types. What I am thinking is that you would do something like this:
if api.mode then
if order.type = "collect order" then
..... do some stuff....
else
..... do some other stuff .....
endif
endif