Introduction:
In this blog we will see how to write JavaScript in Model Driven Apps and MSCRM
Events:
1. On Load Event
2. On Save Event
3. On Change Event
Steps to Follow
a. To Proceed With First Navigate to https://make.powerapps.com
b. Then Navigate to Table where you want to write JavaScript
c. Then Click On Form --> Open the main form
d. then Click on Events and Click Add Library
e. If you have already Web Resource Available you can select the WebResource if not select New WebResource
f. Then it will open a form there you can enter the WebResource Name then type as JSCRIPT and Click Text Editor then you can input your JAVASCIPRT for the Event
e. Once the WebResource Selected you can See the Event Hander Button will get Enabled
g. You can see the Event Handler click On OnLoad (Event Handler) to Process with On Load Event then On Save(Event Handler) for On Save Operation once added the funciton Name Click ok
h. then we can See the Event Gets Added
FOR ONCHANGE OPERATION:
a. Click on the Field in the Form to Proceess with On Change Operation
b. Here you can see the Events with On Change Operation
c. Click On Event Handler and Add the On Change Function name in Function Text Box
Then Click on Done
Save and then Publish
That's It.
Now if you Open the Screen then You can see the OnLoad(when page Gets Loaded),OnChange(When a Field Gets Changed), OnSave(When a Page gets Saved)
For Script/Demo Solution you can refer to this github
No comments:
Post a Comment