Hi Friends,
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.
FormName formName()
{
return formstr(McsRelationWizard);
}
private void createRelation(CustAccount _custAccount , McsConnectionId _connectionId)
{
Form form;
Args argsLocal = new Args();
;
this.initFormRun();
form = formRun.form();
argsLocal.object(form);
argsLocal.caller(this);
formRun = classfactory.formRunClass(argsLocal);
formRun.init();
formRun.QcHandOver(_custAccount,_connectionId);
}
public static void main(CustAccount _custAccount , McsConnectionId _connectionId)
{
QcHandOverRelation wizard = new QcHandOverRelation();
;
wizard.createRelation(_custAccount,_connectionId);
wizard.run();
}
Vivek Chirumamilla
No comments:
Post a Comment