Showing the value of one field value on basis of another field on the dialog.

Hi,
The following code is for : When u select CustomerId in Field1 then it automatically takes the name of the selected CustomerId in field2…

public class ReportRun extends ObjectRun
{
DialogField dialogfield1,dialogfield2;
CustAccount custId;
Name name;
}

public Object dialog(Object _dialog)
{
DialogRunbase dialog = _dialog;
;
dialog.caption(‘Customer information ‘);
dialog.addGroup(‘Select CustomerId :’);
dialogfield1 = dialog.addField(typeid(CustAccount),”Cust Id : “);
dialogfield1.value(custId);
dialogfield2 = dialog.addField(typeid(Name),”Cust name : “);
dialog.allowUpdateOnSelectCtrl(true);

return dialog;
}

public void dialogSelectCtrl()

{
;
dialogfield2.value(custTable::find(dialogfield1.value()).Name);
}

boolean getFromDialog()
{
;
custId = dialogfield1.value();
name = dialogfield2value();
return true;.
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s