Article Details
| Id: | 12071 |
| Product: | finPOWER Connect |
| Type: | NEW |
| Version: | 2.01.01 |
| Opened: | 16/07/2014 |
| Closed: | 22/07/2014 |
| Released: | 31/07/2014 |
| Job: | J013641 |
Page Sets; Can now run an Action Script
A new method, psh.ExecuteActionScript() has been added to the Page Set Handler to allow a Page Set to run an Action Script.
The following example loads a Client and then executes an Action Script that may update the Client's Name:
Public Sub cmdTest_Click(sender As Object, e As finPageObjectClickEventArgs) Handles cmdTest.ClickDim Client As finClientDim Ok As BooleanDim RequiresRefresh As Boolean' Assume SuccessOk = True' InitialiseClient = finBL.CreateClient()' Load ClientOk = Client.Load("paul")If Ok Then' Show DetailstxtName.Text = Client.Name' Execute ScriptOk = psh.ExecuteActionScript("CCASENAME", "Client", Client, Nothing, RequiresRefresh)' Has Action Script has updated the Target ObjectIf Ok AndAlso RequiresRefresh ThenOk = Client.Refresh()' Show Updated DetailsIf Ok ThentxtName.Text = Client.NameEnd IfEnd IfEnd If' ErrorIf Not Ok ThenmUI.ErrorMessageShow()End IfEnd Sub
NOTE: If you don't supply a Script Id, the User will be prompted to select the Action Script to run based upon the supplied Target Object Type.