Retrieve data (iCalUId) from newly created event - list

I'm trying to synchronize a sharepoint list and an outlook calendar through power automate flows.
Following several posts here and there, I managed to successfully create 2 flows:
When an event is created or modified in outlook an item is created or updated in the sharepoint list. To link the two I'm storing iCalUId from the outlook event into an eventID column in the sharepoint list.
When an item is modified in the sharepoint lost, the event is updated in the outllok calendar, again, using eventID <-> iCalUId as a link/key
What I need now is to create an outlook event when a new SP item is created. I am stuck at the point where after creating the outlook event, I would need to retrieve back the iCalUId from the newly created event, and store that back in the item in the list.
Any idea or hint on how to do that would be great ;-)
Thanks !

It is recommended that you directly use the calendar app in the classic mode in SharePoint, and then select Connect to Outlook to synchronize the two calendars.
For more information, please refer to:
https://www.rrc.ca/its/help-resources/sharepoint/connect-sharepoint-calendar-to-outlook-calendar/
https://agsci.psu.edu/it/how-to/connect-sharepoint-2013-calendar-to-your-outlook-calendar

Related

Modifying PowerBIIntegration.Data fields from PowerBI without restarting PowerApp canvas from scratch

Am pulling multiple fields into PowerApps from PowerBI via the PowerBIIntegration.Data.(Value) connection.
I realised after designing the whole app that I was calling a 'Count' summary rather an 'Average' summary of the metric I wanted. Having modified this, I can no longer retrieve that data - the connection seems to be broken.
Previously on a separate occassion, I added a field in PowerBI after finishing the app, and again, I could not retrieve the field in PowerApps, I could only retrieve the initial fields I had added. It seems as if there is a snapshot of fields when you first make the app, and this can't be modified.
I don't want to rebuild the app a third time if I don't have to!
Is there a way to refresh this?
Yep, I have tried PowerBIIntegration.Refresh().
Thanks!
Solved this issue.
Publish the dashboard to the PowerBI service with the new fields.
Click the 3 dots in the top corner of the PowerApp and click edit.
This will take you to the browser/development space for the app.
New/updated/renamed fields are now included/reflected.

Microsoft Dynamics 365 - workflow process to generate a calendar entry that synchronises with Exchange/Outlook calendar

I'm building a workflow process in Dynamics 365 triggered by changes to a date/time field in the Opportunity entity - this should create (or update) a [Dynamics] Calendar entry for the user to whom this Opportunity is assigned on the date/time in question, which should then automatically synchronise with the user's Exchange calendar because server side Exchange synchronisation is enabled.
I've hit a brick wall with this having tried every option I can think of - the following aspects work but not the end to end solution:
1) The workflow is triggered as expected, and correctly creates the calendar entry in the Dynamics Calendar;
2) If I manually create an entry in the Dynamics Calendar it appears in the user's Exchange calendar, so I know the server side synchronisation is working correctly.
However ... calendar entries created by my workflow are not synching to the Exchange calendar.
I'm convinced I must be missing something extremely obvious but can't fathom it!
Resolved this now ... Appointments that are created by a workflow process exist in an "open" state (on our Dynamics instances - not sure if this has anything to do with instance settings) whereas manually created Appointments get a status of "scheduled" - it seems the "open" ones don't get synchronised with Exchange.
I couldn't find any settings / filters to specifically include open Appointments in the synchronisation, so instead I added a step in my workflow to set the Appointment status to "scheduled", which did the trick.

Microsoft Calendar Graph API : Id of event not shared between users

I'm currently working on the Microsoft Calendar Graph API and I ran into some problems when trying to synchronize events.
Basically what I have is 2 users on my web service : they both have an Outlook adress. User A create an event on my web service, and add User B as an attendee. The event is then send to Outlook using the REST API. It's created on User A Outlook calendar, and User B receive an invitation on Outlook and the event is created as well in his Outlook calendar.
Now, on my web service, when the event is created, I retrieve the Microsoft ID of the event and store it in my database. This way, when I want to synchronize events between Outlook calendar and my calendar, all I do is retrieve all Outlook events, check their ID and see if they are stored in my database : if they are, then the event already exists on my web service, if they are not then I create the event in my web service.
The problem I have is that when I try to get the Outlook events from User B, the ID of the event is different than the one I stored earlier, and therefore it creates a duplicate that I don't need.
Basically, the event on User A outlook calendar and User B outlook calendar have different ID. I don't understand what's the point of this, because they are the same, the one on User B outlook calendar is just an invitation to the one from User A outlook calendar.
My question is : is there any way I can get around that ? Is there any kind of ID that is shared through users in Outlook/Office365 ? Thanks a lot !
This is precisely what the iCalUId property is for. The id is by design different, as it's a sort of "primary key" for the user's mailbox database. The iCalUId is supposed to be the same across calendars.
From https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/event:
iCalUId - String - A unique identifier that is shared by all instances of an event across different calendars.
There is AFAIK no property that is unique and also constant across different mailboxes. You can add custom properties to events, and make sure that the property value is unique and constant. That would require you to be able to write to User A's events.

Sharepoint 2013 workflow history change user ID

I'm creating a custom workflow in Sharepoint 2013 with Visual Studio for the approval of the elements added to a list. It's as simple as: A user creates the element (initiator) and a different one approves it (approver).
The problem comes when I use the WriteToHistory box to leave trace of the steps. The User ID in the history item that is created is always the initiator and there's no evident way of changing it. Therefore, I thought I could replace the WriteToHistory element with a CreateListItem to create the history item and all its fields manually. When I do so, I can update all of the fields in the history item (even the WorkflowInstance value, that links this new history item with its workflow instance) but not the User ID...
I'm getting the error when the workflows runs and tries to add the new history item
Retrying last request. Next attempt scheduled in less than one minute.
Details of last request: HTTP BadRequest to <siteURL>/_vti_bin/client.svc/web/lists(guid'<workflowHistoryListGUID>')/Items
Correlation Id: 42e20e0f-61d2-4a35-9339-429d395dbdfb Instance Id: c329fba8-dbbd-4123-8411-b90a34ec8fbb
I don't know which items the last two GUIDs refer to. Additional information:
I'm setting the User ID field using its internal name. This field type is a person or group but I don't know how to create an SPUser in the workflow. I've passed a GUID and an Int32 with the user id and nothing changed
I'm not providing values for all the mandatory fields
The rest of the fields work perfectly whatever their types are: string, dates, etc.
Can anybody advise the way of customizing the User ID in the history items? Thanks

sitecore publish item from web to master

I am working with Sitecore Intranet Portal. I am using web database for CD.
If a user change his email Id. How would I publish this to master database.
I am using this code to publish item from web to master db.
// The publishOptions determine the source and target database,
// the publish mode and language, and the publish date
var publishOptions =
new PublishOptions(Database.GetDatabase("web"), Database.GetDatabase("master"),
PublishMode.SingleItem,
item.Language,
DateTime.Now);
var publisher = new Publisher(publishOptions);
// Choose where to publish from
publisher.Options.RootItem = item;
// Publish children as well?
publisher.Options.Deep = true;
// Do the publish!
publisher.Publish();
It would be nice to know the correct procedure.
To publish from web to master is a bad practice.
This kind of content is named User Generated Content. I suggested to use this approach :
https://sitecore.unic.com/2015/07/16/user-generated-content-in-a-security-hardened-environment
Or you can use webservices. This allows all content (even user-generated) to be authored in your CM instance. This allows you to leverage the capabilities of the platform for workflow, publishing, etc.
Either use an external database or use Sitecore users for a certain domain and store everything in the core database. The core database is commonly shared between all environments
You can make use of package to transfer your item from web to master. You can follow the following steps:
Create your item package from web.
Use the tool that i have developed to convert the destination of the items. That is, change from web to master. The tool is found on marketplace at Sitecore package modifier.
Install the modified package on the master database.
Another solution is to have a schedule job that create the package from web, modified it and install it on the master database. This hence require no manual intervention.
I prefer to use this method than the sitecore transfer method because the transfer method tends to timeout or cause an error if there are lots of items to transfer.
The best practice to store the user information in the Core database. Sitecore is using ASP.NET membership to manage the user accounts. I recommend you to store all the user info in the core DB.
Sitecore doesn't provide any option to publish data from web to master, however, it has provides you an option to transfer data from web DB to master DB.
Check out my blog Transfer Items from Web to Master Database for complete details on transferring the data from one DB to another DB
Step 1: Login to Sitecore desktop mode.
Step 2: Select the source database from where you need to transfer the items. If you want to transfer from Web to Master then select Web Database in the right-hand bottom corner.
Step 3: Open the content editor and select the item which you would like to transfer.
Step 4: Right click on the Item and select Copying>>Transfer and click on the transfer button
Step 5: In the Transfer window verify if the source item is selected properly or not.
Step 6: Click on Next to continue. In this window first thing is to select the destination database to which you need to transfer. The second thing is to select the parent item or the destination folder where you need to place this item. In my case, I need to select Layout because sublayouts are present in the layouts item.
Step 7: Click on next, here you will get an option which says include subitems. Select the checkbox if you need to restore the subitems also else uncheck the box to transfer only the selected item.
Step 8: Click on transfer button and it will start the transfer process. Close the dialog box once the transfer is completed.