Mattersphere Developers Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Go down
avatar
Admin
Admin
Posts : 122
Join date : 2018-12-17
https://mattersphere-devs.forumotion.com

Launching a Wizard using a button on a tab Empty Launching a Wizard using a button on a tab

Thu 20 Dec 2018 - 11:38
Original Post by Gareth Ahmun

Does anyone know how to launch a wizard from a button on a tab? Thanks

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Original Post by Renato

Hi Gareth, You can use the GetWizard( ) method as in the example below: 

Code:
FWBS.OMS.UI.Windows.Services.Wizards.GetWizard("fdscrLRGetTitle", null , FWBS.OMS.EnquiryEngine.EnquiryMode.Add, _kvc);

In this instance, parameters are passed to it using a key value collection (kvc) Hope this helps. Renato.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Original Post by Peter Barnett

You'll find a couple of example in the Taskflow helpfile but the main difference is that you cannot use the CurrentFile object. Instead you'll need to get the file object from the enquiry form you're working on by using

Code:
FWBS.OMS.OMSFILE _currentfile = EnquiryForm.Enquiry.Object as FWBS.OMS.OMSFile;

That way you can launch the wizard in the context of the file you are working on.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Original Post by Gareth Ahmun

I thought the following code is what you've both advised but it doesn't work, it gives an error 

There was a problem creating an object of type 'FWBS.OMS.OMSFile'.”FWBS.OMS.OMSFile _currentfile = EnquiryForm.Enquiry.Object as FWBS.OMS.OMSFile; object _result = FWBS.OMS.UI.Windows.Services.Wizards.GetWizard(“udWZCLRTAINIT”, _currentfile, FWBS.OMS.EnquiryEngine.EnquiryMode.Add, new FWBS.Common.KeyValueCollection());

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Original Post by Renato

Is the button on a tab in a Client or a Matter? 

To access an FWBS.OMS.OMSFile object, the screen object upon which the button resides must be registered with the OMSFile object. 

The screen then sits on a tab in a Matter. I have tried this with your script and it worked......

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Original Post by Gareth Ahmun

The enquiry form is registered against the OMSFile object.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Original Post by Peter Barnett

Sorry to be pedantic, but the error that's being displayed suggests that the tab has been inserted on the wrong object otherwise the code you've written should work. I can't see how you could do otherwise but can you confirm that the tab is on a Matter.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Original Post by Gareth Meech

Hi Gareth Grahams code should help you here - you could also try this simpler version.

Code:
FWBS.OMS.OMSFile f = Enquiry.Object as FWBS.OMS.OMSFile;
FWBS.OMS.UI.Windows.Services.Wizards.GetWizard(“udWZCLRTAINIT”,f,null);

This code assumes the following as a minimum: 
The Screen the code is run from is bound to the FWBS.OMS.OMSFile object
The Screen udWZCLRTAINIT is bound to the FWBS.OMS.OMSFile object
The screen udWZCLRTAINIT requires no parameters to be passed through as a Key Value Collection. 
Other data access (such as extended data) are registered correctly

If this does not resolve your issue, please package up your screens and log a call with the helpdesk
Regards
Gareth Meech

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Original Post by Gareth Ahmun

Thanks very much to both Graham and Gareth, both of your suggestions work.Thanks,Gareth
Back to top
Permissions in this forum:
You cannot reply to topics in this forum