Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

How To Pin An Email To The Case Timeline Using Power Automate?

Posted on by 327
Hello,
 
I have a Power Automate that retrieves an email for a Case.  Now I want to pin that email to the timeline of the Case.  It does not appear as easy as setting 'Ispinned' to yes on the email.
 
Can it be done and has anyone done this?  Can you please share how you did this?
 
Any help is appreciated,
 
Thank you,
 
Jim  
  • Suggested answer
    How To Pin An Email To The Case Timeline Using Power Automate?
    Well, I figured it out.  Once again Microsoft's Power Automate is as clear as mud.  In the Dataverse Add a Row action, msdyn_timelinepin does not appear and does not resolve to the value it is looking for 'Timeline Pins'.
     
    In the Add Row action, select Timeline Pins, add the values for Form Record Id, Pinned Recorded Id, Pinned Recorded Logical Name, Timeline Control Id, Partition Id, and Time to Live.  You may want to add a check to see if the email is already pinned, I didn't need to do this because this only runs on Case create, so in theory, it isn't possible to have a pinned email already. 
     
    Does anyone know the URL you drop into a browser and it will return all the different names for all objects?  I had it at one point but can't find it now...
     
    Thank you,
     
    Jim
  • How To Pin An Email To The Case Timeline Using Power Automate?
    So, I've figured out the first half, to pin an email I need to insert a record into msdyn_timelinepin.  I have that working in xrmtoolbox sql4cds, now how do I do it in Power Automate?
     
    insert into msdyn_timelinepin (msdyn_formrecordid, msdyn_pinnedrecordid, msdyn_pinnedrecordlogicalname, msdyn_timelinecontrolid, partitionid, ttlinseconds)
    values('The GUID of the Case Record', 'The GUID of the Email Record', 'activitypointer', 'GUID of the Timeline Control', 'Concat of GUID of Case Record+GUID of Timeline Control', 31536000)
     
    • the case and email GUIDs, you get those from the URL when in the records main form
    • activitypointer is a constant for any activity record, since emails are closed activities, this makes sense
    • timelinecontrolid not sure if this is specific per environment or not, but just pin an email, query the table and whatever GUID is there is the one you use.
    • partitionid is the concat of the two GUIDs with a '+' between them, no space.  Why this needs to exist, does not make sense, but populate it anyways.  If you don't you will get an error when trying to query the table after the insert.  You will need to delete the record before a select will work on the table.
    • 31536000 is the number of seconds in 365 days.  I'm guessing the system will automatically unpin the record after 1 year.  I don't know if any other value will work and I'm not willing to take a chance, this is the value MS used so that's good enough for me.
    Now to get a record inserted into msdyn_timelinepin using Power Automate, but how?
     
    Thank you,
     
    Jim

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans