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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

CRM Case type issue

(0) ShareShare
ReportReport
Posted on by 5,514

We have CRM Case Type: Customer Complaints- [below pic]

cust-22_2D00_1.PNG 

When we select case type .

In details section Situation field which is mandatory should be filled [Below pic]

cus-com-22_2D00_2.PNG

But the Issue here is

when in customer compliant CRM cases that the situation required field data that We populate is disappearing.  I have entered the situation and saved the case twice and the information disappeared and asked me to populate again.  This happened to me yesterday too. 

cust-comp2.PNG

 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    MNarmeen Profile Picture
    1,848 on at

    Try adding the situation field in a separate tab.

  • sandeepc Profile Picture
    5,514 on at

    22_2D00_1.PNG   its should be under details section only

    the issue is we can add the field but after saving the case again it goes empty in situation field

  • Verified answer
    MNarmeen Profile Picture
    1,848 on at

    If the field is read-only and if you set the value using script it wont be saved until you set fields SetSubmitMode to "always".

    Use the below script to set field submitMode to always

    Xrm.Page.getAttribute(arg).setSubmitMode("always");

    community.dynamics.com/.../158588

  • sandeepc Profile Picture
    5,514 on at

    thank you. oi will try it once it works will make your answers as verified

  • sandeepc Profile Picture
    5,514 on at

    3005.22.PNG

  • Verified answer
    MNarmeen Profile Picture
    1,848 on at

    arg must be your fieldname.

  • Suggested answer
    TNS Profile Picture
    1,197 on at

    Hi,

    if you are using this script "Xrm.Page.getAttribute(arg).setSubmitMode("always");"

    then in place of arg you have to write the field name with double quotes .... I think you are  writing the arg only there replace it with field name..

    Thanks!

  • sandeepc Profile Picture
    5,514 on at

    i added field name but i am not getting error but still i cannot see option set in field

  • sandeepc Profile Picture
    5,514 on at

    function onCustomerComplaint(selection) {

    debugger;

       var situation = Xrm.Page.ui.controls.get("new_situation");

       if (Xrm.Page.ui.getFormType() != 4) {

           if (situation) {

               var options = situation.getAttribute().getOptions();

               if (selection.text == "Delivery/Shipping") {

                   situation.clearOptions();

                   for (var i = 0; i < options.length; i++) {

                       if (i == 0 || i == 1 || i == 2 || i == 3 || i == 4 || i == 5 || i == 6 || i == 7 || i == 8 || i == 9 || i == 10 || i == 11 || i == 12 || i == 72) {

                           situation.addOption(options[i]);

                       }

                   }

                  // Xrm.Page.getAttribute("new_situation").setValue(100000000); //Default is Carrier

    //[COMMENTED ABOVE  LINE OF CODE for KGP-2058]

               } else if (selection.text == "Product") {

                   situation.clearOptions();

                   for (var i = 0; i < options.length; i++) {

                       if (i == 13 || i == 14 || i == 15 || i == 16 || i == 17 || i == 18 || i == 19 || i == 20 || i == 72) {

                           situation.addOption(options[i]);

                       }

                   }

                  // Xrm.Page.getAttribute("new_situation").setValue(100000013); //Default is Backorder

    //[COMMENTED ABOVE LINE  OF CODE for KGP-2058]

               } else if (selection.text == "Engineering") {

                   situation.clearOptions();

                   for (var i = 0; i < options.length; i++) {

                       if (i == 21 || i == 22 || i == 23 || i == 24 || i == 72) {

                           situation.addOption(options[i]);

                       }

                   }

                   //Xrm.Page.getAttribute("new_situation").setValue(100000021); //Default is Outage

    //[COMMENTED ABOVE LINE  OF CODE for KGP-2058]

               } else if (selection.text == "Installation") {

                   situation.clearOptions();

                   for (var i = 0; i < options.length; i++) {

                       if (i == 25 || i == 26 || i == 27 || i == 28 || i == 29 || i == 72) {

                           situation.addOption(options[i]);

                       }

                   }

                  // Xrm.Page.getAttribute("new_situation").setValue(100000021); //Default is Outage

    //[COMMENTED ABOVE LINE  OF CODE for KGP-2058]

               } else if (selection.text == "Integration/Assembly") {

                   situation.clearOptions();

                   for (var i = 0; i < options.length; i++) {

                       if (i == 30 || i == 31 || i == 32 || i == 33 || i == 34 || i == 35 || i == 36 || i == 37 || i == 38 || i == 39 || i == 40 || i == 41 || i == 42 || i == 43 || i == 44 || i == 45 || i == 46 || i == 47 || i == 48 || i == 49 || i == 50 || i == 51 || i == 52 || i == 53 || i == 54 || i == 55 || i == 72 || i == 73 || i == 74 || i == 75) {

                           situation.addOption(options[i]);

                       }

                   }

                  // Xrm.Page.getAttribute("new_situation").setValue(100000030); //Default is Does Not Conform to Specification

    //[COMMENTED ABOVE LINE  OF CODE for KGP-2058]

               } else if (selection.text == "Other") {

                   situation.clearOptions();

                   for (var i = 0; i < options.length; i++) {

                       if (i == 72) {

                           situation.addOption(options[i]);

                       }

                   }

                   //Xrm.Page.getAttribute("new_situation").setValue(100000072); //Default is Other

    //[COMMENTED ABOVE LINE  OF CODE for KGP-2058]

               } else if (selection.text == "Policy Procedure") {

                   situation.clearOptions();

                   for (var i = 0; i < options.length; i++) {

                       if (i == 76 || i == 57 || i == 58 || i == 59 || i == 56 || i == 72) {

                           situation.addOption(options[i]);

                       }

                   }

                   //Xrm.Page.getAttribute("new_situation").setValue(100000056); //Default is Freight

    //[COMMENTED ABOVE LINE  OF CODE for KGP-2058]

               } else if (selection.text == "Pricing") {

                   situation.clearOptions();

                   for (var i = 0; i < options.length; i++) {

                       if (i == 60 || i == 61 || i == 72) {

                           situation.addOption(options[i]);

                       }

                   }

                  // Xrm.Page.getAttribute("new_situation").setValue(100000060); //Default is P&A Incompleteness/Response Time (QTE)

    //[COMMENTED ABOVE LINE  OF CODE for KGP-2058]

               } else if (selection.text == "Returns") {

                   situation.clearOptions();

                   for (var i = 0; i < options.length; i++) {

                       if (i == 62 || i == 72) {

                           situation.addOption(options[i]);

                       }

                   }

                  // Xrm.Page.getAttribute("new_situation").setValue(100000062); //Default is Timeframe to Complete Return

    //[COMMENTED ABOVE LINE  OF CODE for KGP-2058]

               } else if (selection.text == "Service") {

                   situation.clearOptions();

                   for (var i = 0; i < options.length; i++) {

                       if (i == 63 || i == 64 || i == 72) {

                           situation.addOption(options[i]);

                       }

                   }

                   //Xrm.Page.getAttribute("new_situation").setValue(100000063); //Default is Customer Service

    //[COMMENTED ABOVE LINE  OF CODE for KGP-2058]

               } else if (selection.text == "Systems") {

                   situation.clearOptions();

                   for (var i = 0; i < options.length; i++) {

                       if (i == 65 || i == 66 || i == 67 || i == 68 || i == 69 || i == 70 || i == 71 || i == 72) {

                           situation.addOption(options[i]);

                       }

                   }

                   //Xrm.Page.getAttribute("new_situation").setValue(100000065); //Default is System Outage

    //[COMMENTED ABOVE LINE  OF CODE for KGP-2058]

               }

           }

       }

    }

  • sandeepc Profile Picture
    5,514 on at

    could you pls help me where should i add Xrm.Page.getAttribute(arg).setSubmitMode("always"); this line in the above code

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans