sant123
29th August 2004, 01:34
Hi forum,
We are on Baan4c4 SP13, and no source code. we have a situation where in I need to validate the Sales Quotation line Item against the Alternate Items table and bring up a message depending on certain condition, how do I do it. Any AFS or Openworld ( we do have the OPenworld Studio with us) wrapper would help me achive this requirement.
Appreciate any help and examples.
mark_h
30th August 2004, 16:51
Check out the rush solution in code and utilities forum. Then you can change how the sales quotation line item validation works. I am not a rush user, but a qkey user. You can search for examples.
Mark
Hitesh Shah
30th August 2004, 17:09
As i understand , u wish to bring a message to the user and NOT prevent the user entering / updating the data. If this be the case , u follow the following steps to accomplish the task.
1. Copy the form to ur customized VRC.
2. In any field after the item code (where cursor goes) , create an autozoom to a new customized session.
3. In the before program section of the customized program , do all ur custom check and give the message if any required and exit the program (in the before.program section only).
We have done similar thing at other places (sales order line) where we have overridded the standard default value with the value required by the user. Here is the sample .
before.program:
import("tdsls041.cuno",cuno)
import("tdsls041.cwar",cwar)
select tdjwx204.*
from tdjwx204
where tdjwx204._index1 = {:cuno}
as set with 1 rows
selectdo
tcmcs003.cwar = tdjwx204.cwar
endselect
if cwar <> tcmcs003.cwar then
export("tdsls041.cwar",tcmcs003.cwar)
end()
endif
tmpstr = zoom.to$("mtdinv00009004",z.menu,prog.name$ ,"tcmcs003.cwar",0)
export("tdsls041.cwar",tmpstr)
end()
If u wish to validate the data and prevent the data entry itself , then oracle triggers are the best option besides AFS/OW what u already have.