Exchange Web Services, unable to set startTimeZone of appointment (java api) - exchange-server

When trying to set the start time zone of an appointment (in ews java API 1.1.5) I get an error. I'm trying to set the time zone because an exception is raised when using appointment.setStart otherwise.
Appointment = new Appointment(service);
appointment.setStartTimeZone(new TimeZoneDefinition() {{setId("what should go hère")}});
appointment.setStart(startTime);....
Using exchange 2007

It finally appear that the JAVA EWS API is a bad (and full of bugs) port of the C# version.
So the rule is simply to not use it.
There is some alternative out there :
J-xchange
For my specific question, it looks like setStartTimeZone function expect a C# object, which it's not possible to get.

I was able to get around this by commenting out the validation code regarding StartTimeZone (lines 247-256 of Appointment.java) and recompiling the jar. If I pass in date/times based on UTC, the appointment gets created in the user's timezone.

Related

EWS - Can't load FirstDayOfWeek property of Appointment.Recurrence

I can successfully load the Recurrence property for an Appointment using EWS (connecting to an Office 365 server), but when I try to access the FirstDayOfWeek property of a WeeklyPattern I always get the following exception:
FirstDayOfWeek threw an exception of type 'Microsoft.Exchange.WebServices.Data.ServiceValidationException
All other properties of the WeeklyPattern seem to load happily (see below) except this.
Is it possibly down to the requested server version I'm using when creating the ExchangeService object?
thisConnection = New ExchangeService(ExchangeVersion.Exchange2010)
I've checked the AppointmentSchema properties available when loading the Appointment, and other than AppointmentSchema.Recurrence (which I am obviously using) there doesn't seem to be anything else I'm missing there.
The FirstDayOfWeek property is not available in the exchange version you have referenced.
The property was introduced in Exchange Server 2010 Service Pack 1
(SP1).
See reference in the Remarks section of this article
You would need to install that service pack and change your code to the below:
thisConnection = New ExchangeService(ExchangeVersion.Exchange2010_SP1)

ms crm 2015 - set id of entities from jscript onsave

I need to sync entities from Ms Dynamics Crm 2015 - On Premise to my 3rd party application, for this I have set a JavaScript function on the OnSave event of the Entites( eg. account) I can access all of the attributes and send them to my webservice, but the Id (GuId) of the entity!
how can I access the Id (or set it manually) on this event?!
Xrm.Page.getAttribute("accountid") or Xrm.Page.getAttribute("id") both return null, so I can not setValue using them.
Also Xrm.Page.data.entity.getId() returns "" which is probably logical, since Object has not been inserted in the db yet, this is the reason which makes inserting a runtime generated guid for the entety seems doable !
P.S.
I know I can do same thing with plugins, which I have gone through, but the problem there is that when I register my plugin for Update message it gets called a lot of times, (mostly when it has been set for invoice), this is the reason that made me go with the JScript, since the OnSave Event seems more logical than the Update Message of the plugin
As you already found out, records which have not yet been saved have no ID. That's by design (and obvious).
Also, IDs being PKs in the database, they are handled by the system and cannot be touched or hand-crafted.
Your best bet to keep a similar behavior would be a Post-Operation Create plugin living outside the sandbox (Isolation mode: None).
Another good option would be to pull data instead of pushing it: the 3rd party application can periodically fetch new records through any of the exposed APIs (REST, SOAP, SDK ... there are many options).

Oracle CRM On-Demand - Use Tasks Status to update Service Request Status

We're using CRM On-Demand for our Service Group and I'm running into an application limitation and am wondering if anyone has a workaround or just some general ideas on how to accomplish our goal.
In the application, our major focus is around the Service Request and driving for users to create Tasks for all Activities related to working towards closure. For example, a customer calls in and we need a technical resource to make a return call to diagnose the issue in detail, so a Task is assigned to that resource. Once that Task has been marked as completed, I'd like the Status to be updated. I tried creating a workflow using JoinFieldValue(), which wasn't working. I tried a more basic approach and tried to just have a field on the Service Request be populated with the Status of the Task, but that did not work either.
Upon further investigation in the Help File, there is a relationship from the Activity object to the Service Request object, but not one the other way.
So, has anyone else run into this limitation and found some other method to have a Status change on the Task update the Status of a Service Request?
(Also, I'd like to try and avoid writing a custom web service for this purpose, which is why I'm trying to use the tools in the app)
Thanks in advance for any ideas!
actually, if I well understood your issue is related on workflow cross object.
OCOD doesn't manage this type of workflow when you need to use workaround.
In order to cover a cross object worklflow you have many possibilities:
webservices as you said, but you could imagine a js code that will run WS and hosted directly into OCOD (in R19 you could hoste that in Client Side extension). That could be a good solution
Another one could be using Report with a custom look up functionnality with the usage of "Callback" function
I would prefer the 1st solution.

strutrs2 and ajax(Displaying dynamic value on jsp)

Im pretty new to struts2 and Ajax ,Actually i have a drop down menu in JSP lets say first.jsp, When user select a choice from dropdown menu,I am calling a function of Action class lets say Method1.In this method i am fetching some value from DB(lets say:a,b,c) and one value from java memory lets say d.Then I am forwarding to second.jsp and display all the parameters(a,b,c and d) in tabular format.
Now problem is that the parameter d is dynamic ,this is updating by some other application and if its change then I have to show it on JSP wihout any action.
One solution is I use in second.jsp , so after interval of 10 second again Mehod1 will call and it will fetch value(a,b,c) from db and updated value of d from java memory. and disply it to second.jsp.But in this case i am unnecessary retrieving value from db while my purpose is just to get value d from memory.This is working but this is causing my application to slower.
Can any body suggetst some other solution? or can i do it using ajax and how?
Any other advice? any help is appreciated.try to be more clear, i'm in lack of ideas in this problem, even it sounds like a classic :I have spend hours trying to play around with this but have got nowhere
Okay... What you're asking is a little fuzzy so let me rephrase:
You have a user (USER1) who opens a web page and sees some data.
You have a second user (USER2) (who may be an application) who is able set a value from time to time.
When USER2 updates that value you want USER1 to see it change in their open browser window?
If this is the case you need to understand basic ajax. For that get these demo applications working:
This example uses dojo and perhaps the S2 ajax tag lib I don't remember I prefer not to use ajax tags (as they are deprecated and prefer jquery for ajax):
http://struts.apache.org/2.x/docs/struts-2-spring-2-jpa-ajax.html
This example here shows a very similar application but using jquery, no tag library, upgraded to Spring 3, it still needs polish:
http://www.kenmcwilliams.com/Downloads/
Now that you know how to get data via ajax, look at the request with firebug. You'll see that the request is just like a typical function call, the browser keeps waiting for the data to come back.
What you do is simply not return from the action until new data is provided. This is called long polling see: http://en.wikipedia.org/wiki/Comet_%28programming%29#Ajax_with_long_polling
If you have not written a simple chat program, using just terminal windows I recommend you do so. Two windows per client (client-send, client-receive windows) and you'll need a server program. I remember hacking one together in a few hours using _Thinking In Java 2nd Edition (Later books took out the networking section if I remember correctly). Anyways between understanding client server interaction and long polling will let you get things working. It would be fun to extend the simple terminal based chat application to a S2 ajax chat application. Would make an awesome tutorial! PS: This is just an application of the producer/consumer problem (If you understand that then I guess you don't need to do the fun exercise).
The interfaces would look very pretty if the server was managed by spring. I know there must be nice servers already written but I am not familiar with any, but would love to hear of one.

What time zones does Outlook 2007 support in iCalendar invites?

I understand Outlook only "partially" conforms to the standard. Does Microsoft have a published spec on what they do conform with?
I need a list of the available time zone id's I can use for Outlook meeting invites.
I'm using ical4j to build my invite. I found the ical4j-zoneinfo-outlook project, and it works for the basic America/Chicago and America/New_York time zones. Overall I can't get a list of the complete available id's from this library, and it won't support basic "GMT-6:00".
Any ideas? Thanks!
The best way to get a full list of timezone ids for iCal4j is to check the http://tzurl.org/zoneinfo-outlook website. This is the source for ical4j's timezones.
Note that you still need to either manually or programmatically traverse the site to get all the valid ids.

Resources