Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Call all OnChange functions on OnLoad

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi guys,

I have a JS function which I bind on OnChange event on a field.

This function show / hide a tab based on true / false value of the field.

function show_hide_tab(executionContext, tabname)

{
	Xrm.Page.ui.tabs.get(tabname).setVisible(executionContext.getEventSource().getValue());
}


How can I easily execute this function on OnLoad of the form, so the tab can be show / hidden based on the coresponding field value?

Thanks.

*This post is locked for comments

  • Suggested answer
    Jharana Baliyar Singh Profile Picture
    Jharana Baliyar Singh 2,665 on at
  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Call all OnChange functions on OnLoad

    thats what I want, but as you can see in my source code, the function it self is contains no fix name of tab name nor field name

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Call all OnChange functions on OnLoad

    You can simply use this function in onload also with some moidifcation on the tabname. You need to check for the tab name in the onload function.

    Mansoor

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,307 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans