Today we are going to see how we can run the wizard through code.Just by clicking the button the wizard will run. We have a doubt what is the point of running the wizard automatically without providing values. We can also pass the values through code and run the wizard.
Here is a snipet of the existing functionality where a relation wizard is run between customer and connection.The relation wizard is called from a class.
Where we are going the run the wizard without Human Interaction .
Here are the steps below:
Cerate a new class and extend with sysWizard or your wizard which is running.
private void createRelation(CustAccount _custAccount , McsConnectionId _connectionId)
Args argsLocal = new Args();
form = formRun.form();
formRun = classfactory.formRunClass(argsLocal);
public static void main(CustAccount _custAccount , McsConnectionId _connectionId)
QcHandOverRelation wizard = new QcHandOverRelation();
Thursday 28 March 2013
Friday 22 March 2013
In my previous posts I had shown how to open a form in runtime , but opening the form in runtime is one aspect and passing the information to the base form based on user selections is another hurdle.
Today we are going to pass the customer from one form to another.
We have a customer field in a form and this customer has to be searched from another form where the list of customers are shown. User places the cursor on the serach and press use customer this selected customer must be returned to the cutomer field
To return the customer which we have selected , write doen the following code in the clicked method of the use customer.
While in the first form write the follwing code to open the form for selection and taking the value for the which has been returned.
args = new Args();
formRun = classFactory.formRunClass(args);
retValue = args.parm();
By this whatever value we have selected in the second form not only passes to the first form but also the value is diplayed in the current field.