SOAP request stopped to provide PidLidGlobalObjectId and PidLidCleanGlobalObjectId? - exchange-server

I developed an Outlook addin which relies on GlobalObjectId to uniquely identify an event in the calendar. But suddenly the SOAP request I was using to the Exchange server stopped providing the GlobalObjectId and CleanGlobalObjectId.
I was using this request and it worked fine
function generateCalendarUidSoapRequest (itemId) {
const request = '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' +
' <soap:Header><t:RequestServerVersion Version="Exchange2013" /></soap:Header>' +
' <soap:Body>' +
' <m:GetItem>' +
' <m:ItemShape>' +
' <t:BaseShape>AllProperties</t:BaseShape>' +
' </m:ItemShape >' +
' <t:AdditionalProperties>' +
' <t:FieldURI FieldURI="calendar:UID"/>' +
' <t:ExtendedFieldURI DistinguishedPropertySetId="Meeting" PropertyId="3" PropertyType="Binary" />' +
' <t:ExtendedFieldURI DistinguishedPropertySetId="Meeting" PropertyId="35" PropertyType="Binary" />' +
' </t:AdditionalProperties>' +
' <m:ItemIds>' +
' <t:ItemId Id="' + itemId + '" />' +
' </m:ItemIds>' +
' </m:GetItem>' +
' </soap:Body>' +
'</soap:Envelope>'
return request
}
The response gives no error but now it does not include any <t:GlobalObjectId> nor anything similar. Perhaps an update in the Exchange server? What can I do to fetch the GlobalObjectId or the CleanGlobalObjectId?

I have no problem when requesting these two properties using the following:
<t:AdditionalProperties>
<t:ExtendedFieldURI PropertyType="Binary" PropertyId="3" PropertySetId="6ed8da90-450b-101b-98da-00aa003f1305"/>
<t:ExtendedFieldURI PropertyType="Binary" PropertyId="35" PropertySetId="6ed8da90-450b-101b-98da-00aa003f1305"/>
</t:AdditionalProperties>

Related

How Empty folder "Delete All" in outlook plugin

Is there any way to manage folder to delete all items there? i want to clear trash folder "deleteditems" when i used EWS i got an error :
The requested web method is unavailable to this caller or application.
Is there any workaround to make it works in web plugin ?
full code here :
var xml =
'<?xml version="1.0" encoding="utf-8"?>' +
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" \n' +
' xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" \n' +
' xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" \n' +
' xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">\n' +
' <soap:Header>' +
' <t:RequestServerVersion Version="Exchange2010_SP1"/>' +
' </soap:Header>' +
' <soap:Body>' +
' <m:EmptyFolder DeleteType="HardDelete" DeleteSubFolders="true">' +
' <m:FolderIds>' +
' <t:DistinguishedFolderId Id="deleteditems" />' +
' </m:FolderIds>' +
' </m:EmptyFolder>' +
' </soap:Body>' +
'</soap:Envelope>';
Office.context.mailbox.makeEwsRequestAsync(xml, function (result) {
console.log(result);
});
For Office.context.mailbox.makeEwsRequestAsync, we only support a small subset of EWS operations, all documented here. EmptyFolder is not one of the supported operations; that's why you are getting the error. An alternative approach is to use Microsoft Graph.

EWS getting of MimeContent async request takes too long to respond in Outlook Desktop

I am working with Outlook Plugin and i used Exchange Web Service to support lower versions of Outlook.
I have to fetch the mime content of the email and upload it somewhere. I am using this code to fetch the mime content but when using Outlook Desktop it took aroung 3 mins for 400kb file to load. Do you have any suggestions or resolutions on this? I can't use Graph API and Rest API because some users are using old Exchange Server.
'<?xml version="1.0" encoding="utf-8"?>' +
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' +
' xmlns:xsd="http://www.w3.org/2001/XMLSchema"' +
' xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"' +
' xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"' +
' xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' +
' <soap:Header>' +
' <RequestServerVersion Version="Exchange2013" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" soap:mustUnderstand="0"/>' +
' </soap:Header>' +
' <soap:Body>' +
' <m:GetItem>' +
' <m:ItemShape>' +
' <t:ItemClass>IPM.Note</t:ItemClass>' +
' <t:BaseShape>IdOnly</t:BaseShape>' +
' <t:IncludeMimeContent>true</t:IncludeMimeContent>' +
' </m:ItemShape>' +
' <m:ItemIds>' +
' <t:ItemId Id="' + emailItemID + '" />' +
' </m:ItemIds>' +
' </m:GetItem>' +
' </soap:Body>' +
'</soap:Envelope>'

How to ignore SQL Query part of WHERE conditionally in JPA Query

I am wondering if it is possible to ignore part of query (not whole where part) conditionally. I have query in JPA
#Query("SELECT DISTINCT new it.akademija.wizards.models.document.DocumentGetReviewCommand(" +
"d.author.firstname, d.author.lastname, d.id, d.title, d.description, d.documentType.title, d.submissionDate)" +
" FROM Document d" +
" JOIN d.documentType dt" +
" JOIN dt.reviewUserGroups rug" +
" JOIN rug.users u WHERE u.username = :username" +
" AND d.documentState = it.akademija.wizards.enums.DocumentState.SUBMITTED" +
" AND u <> d.author" +
" **AND (lower(CONCAT(d.author.firstname, ' ', d.author.lastname)) like %:searchFor% " +
" OR lower(d.title) like %:searchFor%" +
" OR lower(d.description) like %:searchFor%" +
" OR lower(d.id) like %:searchFor%" +
" OR lower(dt.title) like %:searchFor%)")
Page<DocumentGetReviewCommand> getDocumentsForReview(#Param(value = "username") String username,
#Param(value = "searchFor") String searchFor,
Pageable pageable);
How can I ignore below part if searchFor param is null or blank ("")
AND (lower(CONCAT(d.author.firstname, ' ', d.author.lastname)) like %:searchFor% " +
" OR lower(d.title) like %:searchFor%" +
" OR lower(d.description) like %:searchFor%" +
" OR lower(d.id) like %:searchFor%" +
" OR lower(dt.title) like %:searchFor%)
You could just try adding logic which allows these conditions to be skipped should the search for term be null or empty:
AND
(COALESCE(:searchFor, '') = '' OR
(LOWER(CONCAT(d.author.firstname, ' ', d.author.lastname)) LIKE %:searchFor% OR
LOWER(d.title) LIKE %:searchFor%" OR
LOWER(d.description) LIKE %:searchFor% OR
LOWER(d.id) LIKE %:searchFor% OR
LOWER(dt.title) like %:searchFor%))

Hidden SPAM script in Joomla footer

I got my Joomla site www.semignu.dk and there is suddenly some hidden SPAM script in my footer? How do I remove this?
If you are referring to the following code:
//<!--
document.getElementById('cloak6482').innerHTML = '';
var prefix = 'ma' + 'il' + 'to';
var path = 'hr' + 'ef' + '=';
var addy6482 = 'Kontakt' + '#';
addy6482 = addy6482 + 'semignu' + '.' + 'dk';
var addy_text6482 = 'Kontakt' + '#' + 'semignu' + '.' + 'dk';
document.getElementById('cloak6482').innerHTML += '<a ' + path + '\'' + prefix + ':' + addy6482 + '\'>'+addy_text6482+'<\/a>';
//-->
Then this is not spam. It's part of the email cloaking that you possibly have turned on.
Open the footer module in the Joomla Module Manager and look for:
{emailcloak=on}

Carrying an ID with strings to a next page

I'm trying to carry the ID to the next page, but all i manage to get is review.php?ID= without the ID.
Here is the code:
html = html + "Name:" + name + "Type : " + type + "Location : " + location + '<input type="button" value="Write a review!" onclick=parent.location="review.php?ID=" ('+ ID +') />' + "<br/>";
Thanks in advance for any help.
There's a couple things wrong here. You have mismatched quotes (single and double), and I'm pretty sure the id shouldnt have spaces round it with parens. The embeded quotes need to be escaped, too
something like this:
html = html + "Name:" + name + "Type : " + type + "Location : " + location +
"<input type='button' value='Write a review!' onclick='parent.location=\"review.php?ID=("+ID+")\" />" + "<br/>";

Resources