Today we will post the third and final part of our Advanced Master/Detail tutorial.
Creating Ajax events for the Detail Form.
17 – On the application access the option Ajax events, then click New Ajax Event.
18 – On the first option select the field that’ll be holding the event in this case discount, on the next option select the type event that’ll be used in this case onChange, then click on Create Event.
19 – On the editor call the method calculate_total.
20 – Now do the same step as the 19th but use the field ProductID this time.
21 – On the editor place the following code from the image:
22 – Now do the same step as the 19th but use the field Quantity this time.
23 – On the editor place the following code from the image:
24 – Now do the same step as the 19th but use the field UnitPrice this time.
25 – On the editor place the following code from the image:
Calling the created methods on the events of the Form
26 – On the application menu access the Events area. The same way you place events for fields, we’ll call the methods from the events of the Form.
27 – Generate the source code of the Detail Form. Click on the button Generate on the Scriptcase toolbar.
Create the link between the Master Form and the Detail Form
28 – Go back to the Master Form by click it’s tab bellow the toolbar.
29 – On the application menu click on Master/Detail, then click on New Master Detail.
30 – Insert on the Name and Label Details, then click create.
31 – Next select the Detail Form the click next.
32 – On the next step make a link passing the OrderID of both Forms, then click save.
33 – Now run the Form.
Learn more about this and other features that Scripcase offers. Do you already know Scriptcase? Download the free version of our tool and discover a world of new possibilities.
To know a little bit more about Scriptcase Master/Detail feature don’t miss our Q&A Webinar about “Advanced Master/Detail on Scriptcase”on next Friday (June 06th), click on this link to register.