web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

What is any in JavaScript code how to use it

(0) ShareShare
ReportReport
Posted on by 5,514

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

I have the same question (0)
  • Suggested answer
    Pawar Pravin Profile Picture
    5,237 on at

    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();

  • sandeepc Profile Picture
    5,514 on at

    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);

             //  }

  • sandeepc Profile Picture
    5,514 on at

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

  • sandeepc Profile Picture
    5,514 on at

    3806.sandeep.PNG

    getting error near else. Declaration or statement expected any suggestion

  • sandeepc Profile Picture
    5,514 on at

    @pravin Panwar

  • Suggested answer
    Pawar Pravin Profile Picture
    5,237 on at

    Looks like you have missed { } curly brackets after else

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans