In this article we will learn How to Get the value of a Text field in dynamics 365 CRM ?
In this blog we will see step by step Get the value of a Text field in dynamics 365 CRM.
Step 1. Click on Settings –> Solutions
Step 2. Click on your created solution.
Step 3.Next Step to add “Web Resources”.Click On Web Resources and then Click on New Button.
Step 4.Write the name of web resources in Name and Display Name Field after that select type “Script(JScript)” and Select Language after that click on “Text Editor” button like Screenshot.
Step 5. Write this Code on Text Editor and Click On “OK” button.
//pass here text box logical name
var firstName = Xrm.Page.getAttribute("lax_name").getValue();
alert("Your name is :" +firstName );
Step 6.After that Click on “Save” and “Publish”.
Step 7. Select your Entity and click on “Main Form”.
Step 8. Clicket on “Form Properties”.
Step 9. Here we will add a web resources file name in File Libraries.
Step 10. Search file after that click on “Add button”.
Step 11. In Event handlers section we will select Control “Form” and Event “OnSave” and click on Add button.
Step 12. Write function name and please click on Save button like screenshot.
Step 13. Finally click on “OK” button after that Save and Publish Main Form.