在一个定制的表单中,我将有一个创建采购菜单按钮,它打开一个对话框,以创建采购订单。
但我需要选择一些记录,如一行或两行,然后只为这些记录创建采购订单。我该怎么做?
发布于 2012-04-01 04:51:05
看看SalesTable表单上的"Create purchase order“按钮。
它的工作方式不同:您在按下按钮后选择要购买的行,但它可能也适用于您的情况。
也可以在网格中查看how to use multiple selected records。
发布于 2012-04-02 19:52:39
下面是一段代码,它允许您从上一个表单中获取记录。
您必须将这段代码放入对话框的INIT方法中。所以你必须覆盖对话框的初始化。
DmoVehicleTable vehicleTable;
DmoVehicleId vehId;
// Get the vehicle ID from the previous form
if (element.args() && element.args().record())
{
switch (element.args().record().TableId)
{
case (tableNum(DmoVehicleTable)):
vehicleTable = element.args().record();
vehId = vehicleTable.VehicleId;
break;
default:
throw error (strFmt("@SYS477", this.name()));
}
}我希望这能对你有所帮助。
如果你需要更多帮助:http://sirprogrammer.blogspot.com/
https://stackoverflow.com/questions/9951548
复制相似问题