Skip to main content

Notifications

Announcements

No record found.

Service | Customer Service, Contact Center, Fie...
Suggested answer

How to add div tag or new row in create case form before subject

Posted on by 25

Hi Team,

How to add div tag or new row in create case form before the subject. Please find the marked area.  The purpose of this we need to show the description based on the subject dropdown list selection values 

For example: If we select a subject from the dropdown as accounting then we need to so the description about the accounting in the above area.

Can you help me how to achieve this one in case the creation form?

Please find the screenshot.

pastedimage1604578576622v2.png

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to add div tag or new row in create case form before subject

    Hi Partner,

    Has the problem been solved? Any updates?

    Please click Yes under "Did this answer your question?" to close this thread.

    pastedimage1604890915347v1.png

    Thanks. 

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to add div tag or new row in create case form before subject

    Hi partner,

    It is difficult to create a dynamic div tag it in portal, but you can create a new field to show description based on subject value with the help of javascript.

    Here are steps.

    1.Go Settings > Customization > Customize the system> Entities > Case.

    Create a new field named description and add it to the Web-Create Case form.

    2.Write js code.

    (1) Get subject value id.

    The subject field is special, it shows name in the form but it store guid to database.

    You can write following code in js, when you select one subject, it will open a dialog to provide if of it.

    alert($("#subjectid").val());

    pastedimage1604653688980v1.png

    (2) Add js code to the create case form of portal.

    Select subject and click Edit button.

    pastedimage1604653723606v2.png

    It will open one dialog and switch to Options tab and add js code.

    pastedimage1604653787241v3.png

    $(document).ready(function () {
    	console.log("ready!");
    	$("#subjectid").change(function () {
    		alert($("#subjectid").val());
    		if ($("#subjectid").val() === "07c04ad1-d4e9-ea11-a817-000d3a1c5d97") {
    			$("#new_description").val("test successfully");
    		} 
    	});
    });

    Save and refresh page to test.

    pastedimage1604653845321v4.png

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans