web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Plugin code to modify the case title in a custom format

(0) ShareShare
ReportReport
Posted on by

When a new case is created, the case title field needs to be set to CASE TITLE | CREATED DATE | PRIORITY.
How to write unit test cases for the same?

Example:
Case Title: Laptop not working
Created Date: 10-11-2020
Priority: High

Expected Result for Case Title: Laptop not working | 10-11-2020 | High

I have the same question (0)
  • Suggested answer
    Amit Katariya007 Profile Picture
    10,409 Moderator on at

    Do you want to run an automation to check the functionality ?

  • Community Member Profile Picture
    on at

    Yes, every time a case is created, I want the case title to get changed in that specific format like I've mentioned above.

  • Verified answer
    Amit Katariya007 Profile Picture
    10,409 Moderator on at

    Hello  

    Please follow below steps and you will able to implement your requirement.

    1. Create a trigger point which will trigger your flow. 

    pastedimage1654780719619v1.png

    2. After that you will need case Priority which is an option set. Option set will provide the data as Value rather than text, So for that you will have to follow below article which will help you to get the priority. 

    Get Choice field Text in Power Automate from Microsoft DataVerse/CDS | Softchief Learn 

    Also for me I have used below syntax for the priority.

    triggerOutputs()['body/_prioritycode_label']

    pastedimage1654780938591v2.png

    3. Then you will have to format the Created By date in to your format.

    for that follow below article.

    Solved: Power Automate get Date - Power Platform Community (microsoft.com)

    Also I have used below syntax.

    formatDateTime(triggerOutputs()?['body/createdon'],'dd/MM/yyyy')

    pastedimage1654781032232v3.png

    4. Then use "Compose" which is used to concatenate the values.

    5. finally update the case with new Title.

    pastedimage1654781272178v4.png

    Results : 

    Before : 

    pastedimage1654781314738v5.png

    After : 

    Refresh the page.

    pastedimage1654781356823v6.png

    Thank you,

    Amit Katariya

  • Community Member Profile Picture
    on at

    Hi Amit Katariya, this solution worked like magic, I got my custom title. Thanks a lot. But I wanted this to be done using plug-ins. I had more customisations, so could you please help me out by sending the plug-ins method for the same.

    Thank you.

  • Suggested answer
    Amit Katariya007 Profile Picture
    10,409 Moderator on at

    What other changes can you elaborate ?

    Also you can create a plugin which will run in POST operation stage. Please refer below article which will help you to implement your requirement.

    itaintboring.com/.../Plugin Development.pdf

    temmyraharjo.wordpress.com/.../

    carldesouza.com/.../

    crmchap.co.uk/.../

    Thank you,

    Amit Katariya

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 130 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 117

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans