newly created meeting request from javascript has no recipient data

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mofmans2ndcoming
    New Member
    • Nov 2007
    • 16

    newly created meeting request from javascript has no recipient data

    Hi all,

    I have looked through MSDN on this one and can't seem to find the answer anywhere.

    I have created a JavaScript that will launch a meeting request for an address selected from a list. The problem that is occurring is that when the meeting request opens, and I look at the availability grid, any recipient I put in from the code shows "no information" for availability.

    The weird thing is that if I delete something like a middle initial and hit enter, the user's data appears because it forced outlook to poll Exchange for the data.

    Does anyone know of a way to fix this, perhaps I can force outlook to poll for user data when the window opens?


    Thanks

    Jeremy
  • pronerd
    Recognized Expert Contributor
    • Nov 2006
    • 392

    #2
    Are you sure what you have is JavaScript? It sounds like it might be VB or VBA. In which this is the wrong forum. Either way without being able to see the code I dought that anyone is going to be albe to provide much assistance.

    Comment

    • mofmans2ndcoming
      New Member
      • Nov 2007
      • 16

      #3
      Originally posted by pronerd
      Are you sure what you have is JavaScript? It sounds like it might be VB or VBA. In which this is the wrong forum. Either way without being able to see the code I dought that anyone is going to be albe to provide much assistance.
      I wrote it. It is JavaScript.

      The code I have works fine. it is getting Outlook to behave as I wish that is the problem. I want to get a JavaScript solution to this rather that coding VBScript for the form because I would like everything to be in one place.

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5388

        #4
        as pronerd said ... you should post the relevant code because without it it would be a guessing game to say something that could help ...

        kind regards

        Comment

        • mofmans2ndcoming
          New Member
          • Nov 2007
          • 16

          #5
          Originally posted by gits
          as pronerd said ... you should post the relevant code because without it it would be a guessing game to say something that could help ...

          kind regards
          OK. Here is the code.

          Code:
          outlookApp = new ActiveXObject("outlook.application"); 
          nameSpace = outlookApp.getNameSpace("MAPI");
          		
          mailFolder = nameSpace.getDefaultFolder(6);
          		
          mailItem = mailFolder.Items.Add("IPM.Appointment.ConfRmReq");		 
          mailItem.MeetingStatus = 1;
          
          mailItem.Subject = "My Test Appointment";        
                          
          mailItem.Start = TheDate();
          
          var recipient = mailItem.Recipients.Add(confRm);//attendees list
          recipient.Resolve;
          		
          if(recipient.Resolved)
          {
             mailItem.Display(); 
          }
          This code does exactly as I want. except that the availability information shows as "no information" on the grid. If I change the name slightly and force it to resolve the address in the form, the availability becomes available in the grid.

          Comment

          • mofmans2ndcoming
            New Member
            • Nov 2007
            • 16

            #6
            Originally posted by mofmans2ndcomin g
            OK. Here is the code.

            Code:
            outlookApp = new ActiveXObject("outlook.application"); 
            nameSpace = outlookApp.getNameSpace("MAPI");
            		
            mailFolder = nameSpace.getDefaultFolder(6);
            		
            mailItem = mailFolder.Items.Add("IPM.Appointment.ConfRmReq");		 
            mailItem.MeetingStatus = 1;
            
            mailItem.Subject = "My Test Appointment";        
                            
            mailItem.Start = TheDate();
            
            var recipient = mailItem.Recipients.Add(confRm);//attendees list
            recipient.Resolve;
            		
            if(recipient.Resolved)
            {
               mailItem.Display(); 
            }
            This code does exactly as I want. except that the availability information shows as "no information" on the grid. If I change the name slightly and force it to resolve the address in the form, the availability becomes available in the grid.
            I have got the solution. The issue was that I used an alias for the recipient and those do not resolve as simply as an e-mail address. The reason I had an alias was that it had gotten left in my HTML code when I was attempting to solve the problem initialy. Then I discovered the recipient.Resol ve() method but never changed what I was sending to my code so it was not resolving properly.

            Thanks,

            Jeremy

            Comment

            • acoder
              Recognized Expert MVP
              • Nov 2006
              • 16032

              #7
              Originally posted by mofmans2ndcomin g
              I have got the solution. The issue was that I used an alias for the recipient and those do not resolve as simply as an e-mail address. The reason I had an alias was that it had gotten left in my HTML code when I was attempting to solve the problem initialy. Then I discovered the recipient.Resol ve() method but never changed what I was sending to my code so it was not resolving properly.
              Glad you got it working and thanks for posting the solution.

              You know if you had a proper JavaScript question rather than IE-only JScript, it'd be so much easier to solve!

              Comment

              • mofmans2ndcoming
                New Member
                • Nov 2007
                • 16

                #8
                Unfortunately, for my project I have to use ActiveX.

                I would much rather do this with a proper server side language as it would take a lot less time but at work, I am a man in need of a solution with out the access to the back end to build it so I have to resort to client side work.

                Comment

                • acoder
                  Recognized Expert MVP
                  • Nov 2006
                  • 16032

                  #9
                  Originally posted by mofmans2ndcomin g
                  Unfortunately, for my project I have to use ActiveX.

                  I would much rather do this with a proper server side language as it would take a lot less time but at work, I am a man in need of a solution with out the access to the back end to build it so I have to resort to client side work.
                  Oh, I accept that and it would make things a lot easier with better documentation.

                  Comment

                  • hikumar
                    New Member
                    • Feb 2008
                    • 2

                    #10
                    Hi Guys,

                    I want a javascript function which shows Public Shared Calendar(opens a window) when I click a link from the webpage. Please help me.

                    Ex. /Public Folders/All Public Folders/Photography

                    Thanks in Advance.

                    Comment

                    • acoder
                      Recognized Expert MVP
                      • Nov 2006
                      • 16032

                      #11
                      Originally posted by hikumar
                      Hi Guys,

                      I want a javascript function which shows Public Shared Calendar(opens a window) when I click a link from the webpage. Please help me.

                      Ex. /Public Folders/All Public Folders/Photography

                      Thanks in Advance.
                      Is this from the server-side or the client-side? If from the client-side, that's not really possible with JavaScript, though you may use ActiveX for IE. If from the server-side, use a server-side language.

                      Comment

                      • berg612
                        New Member
                        • Mar 2008
                        • 2

                        #12
                        Hi,

                        I am using your JavaScript code for initiating a new meeting request in Outlook and passing the To, Subject, Start Date, and End Date fields. I was just wondering if you knew how or if it's possible to also automatically populate the Location and Resource (versus the To field) fields?

                        Thanks,
                        Eric

                        My code:
                        Code:
                        //Open Meeting Request
                        function ResMtg(cal,start,end){
                        //alert(cal+' - '+start+' - '+end);
                        //Inbox = 6
                        //Calendar = 9
                        var mailFolder = ns.getDefaultFolder(9);
                        var mailItem = mailFolder.Items.Add("IPM.Appointment.ConfRmReq"); 
                        mailItem.MeetingStatus = 1;
                        mailItem.Subject = "**Meeting Subject**"; 
                        mailItem.Start = start;
                        mailItem.End = end;
                        var recipient = mailItem.Recipients.Add(cal);//attendees list
                        recipient.Resolve;
                        if(recipient.Resolved){mailItem.Display();}
                        else{alert('Unable to resolve this calendar: '+cal);}
                        }

                        Comment

                        • acoder
                          Recognized Expert MVP
                          • Nov 2006
                          • 16032

                          #13
                          I wouldn't be sure, you'd have to check the documentation, but I'd guess mailItem.Locati on and mailItem.Resour ce.

                          Comment

                          • berg612
                            New Member
                            • Mar 2008
                            • 2

                            #14
                            I have tested and verified that the following code works for the Location field.

                            Code:
                            mailItem.Location = 'my conference room';
                            However, I am still testing the Resource functionality. I will try to search through Microsoft's support web site.

                            Thanks,
                            Eric

                            Comment

                            Working...