GET /me/messages/{longMessageId}?expand=microsoft.graph.eventMessage/event
This will return the event object in the mail.
Then I can use
POST /me/events/{longEventId}/accept
POST /me/events/{longEventId}/tentativelyAccept
POST /me/events/{longEventId}/decline
Once I accept, tentativelyAccept. I can still use
GET /me/messages/{longMessageId}?expand=microsoft.graph.eventMessage/event
to return the message object with event object.
However, if I decline it,
GET /me/messages/{longMessageId}?expand=microsoft.graph.eventMessage/event
will return the message object but with an empty event object {}.
So how can I change option later?
That is correct. When you decline the event, it is removed from your calendar. Therefore, there is no event to expand.
Related
The "getAsync" function of the office recipient interface returns an empty result even if adresses has been added to the to/cc/bcc field.
When you enter a email address in the to / cc / bcc field and then you open the ScriptLab sample Add-In (Compose Message To), if you click on the "Get who this is to" button, an empty result is returned. The recipients are still not resolved as they should!
ScriptLab GetAsync
The only way to resolve the recipients is to click on Tab/Space or ";".
When the getAsync is call, all recipients should be resolved automatically.
Outlook caches values and doesn't propagate changes to the object model until the focus is moved to another field on the UI or the item is saved. This is a known issue when dealing with Outlook.
A possible workaround is to call the SaveAsync to get changes saved and then request new values. So, prior to getting recipients in the code you need to call the following method:
Office.context.mailbox.item.saveAsync()
I am trying to understand what exactly is stored in an event using the SAPUI5 documentation here. Where can I find a list of parameters that come with an Event? For example, I just found out that DatePicker has a parameter called "valid", but how would I know that? Surely I wouldn't have to use getParameters() for every entity right? Also when you define a function to be called in XML, do they all send the same Event type?
In general the parameters depend on the intention of the event, e.g. a change event which indicates that the source object has changed its value contains other parameters than an event which informs you that a file upload has failed.
You'll find the available event parameters in API documentation. To stick with your example: Check the API documentation of the DatePicker control, select the change event from the available events and check the available parameter. You will find the parameter valid with a description. To see the difference between the events you may also check the ListBase implementation, which defines a bunch of events.
It is good style to use getParameter in your event handler to access the parameters values.
onDatePickerChanged : function(event) {
let validDate = event.getParameter("valid");
}
I've got a Backbone model with a custom validate method that validates the format of one of a the model's attributes. My model is hooked up to a view that exposes said attribute via a text field. The view has a 'save' button that the user must explicitly press to save the model changes back to the server.
When the user types an invalid attribute value, I want to visually mark the field as being in an invalid state. So far, easy - I can bind the change event of the input field to a function that calls myModel.set({ attribute: value }), and listen for the "error" event on the model to tell when the validation has failed and I should mark the input as invalid.
The problem comes when I want to handle the save button click. Because Backbone.Model.set aborts actually setting the attributes on the model if validation fails, my model will not accurately reflect the value the user has entered unless the value is valid. When the user clicks save after typing in an invalid value, I check whether the model is valid, find that it is (because the invalid attribute was never actually set), and save the old (valid) attribute value to the server.
What it seems like I want is a version of set that always makes the requested changes, but also still triggers validations and events. set(..., { silent: true }) will allow the change to go through, but will not run validations or trigger events.
In short - I want my model to sometimes exist in an invalid state (if the user has entered invalid attribute values), and I want to be able to get events when it transitions between valid and invalid. Is there a graceful way to do this with backbone, or am I thinking about this completely wrong?
I suggest you use this backbone validation plugin https://github.com/thedersen/backbone.validation
Extremely helpful.
For your usecase (to allow values to be set even if they are invalid),
you just need to do override the set function of your model.
set: function (key, value, options) {
options || (options = {});
options = _.extend(options, { forceUpdate: true });
return Backbone.Model.prototype.set.call(this, key, value, options);
}
The 'forceUpdate' property of backbone.validation allows the validate method to return true, while still calling for validations.
After the save click, you can call,
var errors = model.validate(model.validate.attributes);
This will return all the errors that your model has and you can appropriately display them.
You also have callbacks for valid and invalid which you can use freely
What I've done with this sort of validation is to reset the models attributes from the inputs before save on the save click (only doing the save if the set doesn't fail)
This way the save button click re triggers the validation - triggering the error.
It means the model is always valid and you cant progress to the next page until the input is all valid.
As stated in the question, which event is fired when someone goes into the admin panel and selects reindex data for Catalog Search Index?
I tried running grep on my command shell and I cannot seem to get that to work (to get a list of events). I've tried looking at event lists and can't find the correct one.
I would tend to think that the event catalogindex_plain_reindex_after would be fired, but I have tried this and that is not the case...
Any help would be greatly appreciated!
If you cannot find any particular event dispatch you can always get the following event on controller:
<controller_action_postdispatch_adminhtml_index_process_massReindex>...</controller_action_postdispatch_adminhtml_index_process_massReindex>
and in the observer you can get the controller params as:
$observer->getEvent()->getData('controller_action')->getRequest()->getParam('some_id_or_variable');
where 'some_id_or_variable' is the value you want to get from request params.
I am a newbie and i want to get a process or a key window as an object as i need to send message to it.In fact , i need to get them so that i can manipulate them with my input method kid(IMKit).
The corresponding method is:
-(BOOL)inputText:key:modifiers:client:
I want the key window/process receive the event as client.
I am appreciated if anyone can help.
i want to get a process or a key window as an object as i need to send message to it. … the corresponding method is
-(BOOL)inputText:key:modifiers:client:
You have it the wrong way around. As noted in the documentation, that method is one that you implement, in your input method. Your input method does not send that message; it receives it. And all you do in that method is accept or veto the input.
I think you need to post a higher-level question about whatever it is you're trying to do, asking how to do it.