Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

How to Set timeout on the Client Side scripting

Posted on by 50

Hi ,

i am using client side Scripting i am using information from the Quickview form , the mapping and loading of quickview form takes some time as it is dependent on server side C# Script 

so i want to wait my client side script until the quick view form is loaded .

please help me with how to halt the Competency check Function, where to integrate Set timeout before the loading of the executionContext .

var Sdk = window.Sdk || {};
(
    function() {
       
        this.CompetencyCheck = function(executionContext){
            var formContext = executionContext.getFormContext();
            //Get Required Competency
            var quickViewControl = formContext.ui.quickForms.get("IJP");
            var RequiredCompetency = quickViewControl.getControl("ijp_competency");
            var RC = RequiredCompetency.getAttribute().getValue()
            //Get Users Competency
            var quickViewControl1 = formContext.ui.quickForms.get("HRMS");
            var ActualCompetency = quickViewControl1.getControl("ijp_competency");
            var AC = ActualCompetency.getAttribute().getValue()
           
            var val = parseInt(RC[1]) - parseInt(AC[1])

            if (!(val == 0 || val == 1)){
                formContext.ui.setFormNotification("Competency Criteria Does not Match ","ERROR","formnot" );
               
            }else{
                formContext.ui.clearFormNotification("formnot")
            }


        }
    }
).call(Sdk);
thanks

  • Verified answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: How to Set timeout on the Client Side scripting

    Hi,

    You can use isLoaded method on quick view control to know if control has loaded successfully.

    docs.microsoft.com/.../isloaded

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to Set timeout on the Client Side scripting

    Hi,

    Please follow the blow URL.

    juniorcrmblog.blogspot.com/.../configure-inactivity-timeout-in-dcrm.html

    Thanks,

    Arshad

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans