pass the field values from one form to another

hii all,

How to pass the field values from one form to another form.

say we have SalesId,CustName,Qty in one form, when we enter values in these fields and click ok, these values should refelect in another form which contains these fields(SalesId,CustName,Qty).

Thanks

Hi,

You can use Args to pass the values from one form to another form.

  1. On the clicked method of the button in the form you can construct the Args
Args args = new Args()
ContainerClass formValues;
Container conSend;
conSend = conins(conSend, 1,salesLine.salesID);
conSend = conins(conSend, 2,salesTable.custName);
conSend = conins(conSend, 3, salesLine.qty);
formValues = new ContainerClass(conSend);
Args.parmObject(formValues);
  1. Pass the value
new MenuFunction(menuitemdisplaystr("Receiving Form Name"), MenuItemType::Display).run(args);

3. Receive values in the other form's init method 
 	public void init()
 	{
	 containerClass conClass_Obj;
	 container conRec;
	 Args args;
	 ;
 	 super();
 	 args = new args();
 	 conClass_Obj =  element.args().parmObject();
 	 conRec = conClass_Obj.value();

        // assign to respective fields 	 
         conpeek(conRec,1);
 	 conpeek(conRec,2);
 	 conpeek(conRec,3);
        }

Regards,
Raghav.

Hi,

The following link might help you : http://www.axaptapedia.com/Passing_values_between_forms

hope it helps

regards,

Thomas