Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

What is any in JavaScript code how to use it

Posted on by 5,005

Available teacher=[] 

How to use any in this syntax ?? 

Any link on any ?? Links provided will be appreciated 

Thanks 

*This post is locked for comments

  • Suggested answer
    Pawar Pravin  Profile Picture
    Pawar Pravin 5,227 on at
    RE: What is any in JavaScript code how to use it

    Looks like you have missed { } curly brackets after else

  • sandeepc Profile Picture
    sandeepc 5,005 on at
    RE: What is any in JavaScript code how to use it

    @pravin Panwar

  • sandeepc Profile Picture
    sandeepc 5,005 on at
    RE: What is any in JavaScript code how to use it

    3806.sandeep.PNG

    getting error near else. Declaration or statement expected any suggestion

  • sandeepc Profile Picture
    sandeepc 5,005 on at
    RE: What is any in JavaScript code how to use it

    what changes need to be done here in this code it will be helpful if i get solution

  • sandeepc Profile Picture
    sandeepc 5,005 on at
    RE: What is any in JavaScript code how to use it

    var globalContext = parent.Xrm.Utility.getGlobalContext();

           var baseUrl = globalContext.getClientUrl();

           var dataIFrame = parent.document.getElementById("WebResource_Componenta1e3406")

           if (dataIFrame != null) {

               dataIFrame.setAttribute('style', 'border: none !important')

           }

           var dashboardDiv = parent.document.getElementById("dashboardFrameRow");

           if (dashboardDiv != null) {

               dashboardDiv.style.margin = "0px";

           }

           var l_teacherChangeHistory;

           $(document).ready(function () {

               var l_teacherRecord;

    // l_locationRecord,

    // l_courseRecord, l_streamRecord, l_academicYearrRecord, l_selectedAcademicYear, l_option,

    // ClassData;

               //  var l_locationGetObject, l_courseGetObject, l_streamGetObject, l_academicYearGetObject,

               var l_teacherGetObject;

               //l_sendReminderObject, l_classGetObject;

              // l_locationGetObject = new Object();

               //l_teacherGetObject = new Object();

               //l_courseGetObject = new Object();

               //l_streamGetObject = new Object();

              // l_academicYearGetObject = new Object();

              // l_classGetObject = new Object();

                availableTeacher: [];

                availableClass: [];

               var l_teacherRecord;

               l_locationGetObject.columnSet = "sis_name";

               l_locationRecord = Api.oData.retrieveMultiple("sis_locationents", l_locationGetObject, false);

               l_courseGetObject.columnSet = "sis_coursename";

               l_courseRecord = Api.oData.retrieveMultiple("sis_courseents", l_courseGetObject, false);

               l_streamGetObject.columnSet = "sis_name";

               l_streamRecord = Api.oData.retrieveMultiple("sis_streaments", l_streamGetObject, false);

               l_teacherGetObject.columnSet = "sis_name";

               l_teacherRecord = Api.oData.retrieveMultiple("sis_teacherents", l_teacherGetObject, false);

               l_selectedAcademicYear = { '1': false, '2': true, '3': false };

               l_academicYearGetObject.columnSet = "sis_name,sis_academicyearstatus";

               l_academicYearGetObject.orderBy = "sis_name";

               l_academicYearRecord = Api.oData.retrieveMultiple("sis_academicyearents", l_academicYearGetObject, false);

               l_classGetObject.columnSet = "sis_name";

               ClassData = Api.oData.retrieveMultiple("sis_classents", l_classGetObject, false);

               //for (i = 0; i < l_locationRecord.length; i++) {

                 //  l_option = document.createElement("option");

                  // l_option.text = l_locationRecord[i].sis_name;

                  // l_option.value = l_locationRecord[i].sis_locationentid;

                  // document.getElementById("location").add(l_option);

             //  }

  • Suggested answer
    Pawar Pravin  Profile Picture
    Pawar Pravin 5,227 on at
    RE: What is any in JavaScript code how to use it

    Hi Sandeepc,

    As per my understanding you need to use <any> as datatype in TypeScript where as you could use array in place of 'any' in javascript.

    syntax:

    var parameters = {};

                       parameters.EntityGuid = id;

                       parameters.EntityName = Xrm.Page.data.entity.getEntityName();

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,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans