Загрузка...

How to use JavaScript (JS) in model driven App ?

This video explains the process of using JavaScript (JS) file in model driven app to convert text in multiple address fields to Title case. This video makes use of custom JS file uploaded as a web resource in the solution file for the model driven app.

Chapter Timeline
0:09 - Introduction to the problem: converting text to title case in a model-driven app
1:19 - Writing the JavaScript function to convert text to title case
2:53 - Explanation of the title case logic and regex used
4:14 - Uploading the JavaScript as a web resource in the solution
5:20 - Adding the JavaScript library and event handlers to the form fields
6:23 - Testing the title case conversion on contact fields
7:02 - Summary of the process and video conclusion

#powerapps #powerplatform #dynamicscrm #dynamics365 #javascript

Code:
function TitleCaseFunc(executionContext){

var field = executionContext.getEventSource();

field.setValue(toTitleCase(field.getValue()));
}

function toTitleCase(str) {
return str.replace(/\w\S*/g,
function(txt) {
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
//return txt.toUpperCase();
})
}

✔️You can visit https://girishuppal.com (Girish Uppal) website to get more productivity tips.

✔️Please subscribe to @powertechspeck youtube channel https://www.youtube.com/@PowerTechSpeck to get more productivity tips and tutorial content from Girish Uppal

✔️You can view my Linkedin Profile at: https://www.linkedin.com/in/girishuppal/

✔️You can view the badges earned by me at: https://www.credly.com/users/girish-uppal/badges

Видео How to use JavaScript (JS) in model driven App ? канала Power Tech Speck (Girish Uppal)
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять