locked
Facility rating system RRS feed

  • Question

  • Hello,

    I am interested in creating a 'Facility rating system'.  What I want is for a user to be prompted to rate the facility when they close a service activity.

    There are a couple assumptions: the service activitity will always have one resource, the resource will always be a facility.

    I figure the best way to get into the rating system, and to validate my previous assumptions, is to use the onSave event of the service activity form and check if the event.Mode == 5.  I also figure the rating form should be a seperate page, to which I pass the GUID of the facility to be rated.

    Does anyone have ideas about:
    1) How to take the input from the user
    2) The fromat of the data
    3) How to save the data to the facility

    Thursday, February 17, 2011 3:10 PM

Answers

  • So i came up with an alternate idea.

     

    It is a bit less elegant, a bit easyier to implement, and 100% user adjustable.

    I created a new entity for the 'surveys' and defined a 1:n relationship between equipment and the survey.  I then use a URL addressable form to automaticly open the survey at the end of a service activity.

     

    Now there is a history of the ratings, so I can report on it.

    • Marked as answer by Jay C. _ Tuesday, February 22, 2011 8:31 PM
    Tuesday, February 22, 2011 8:31 PM

All replies

  • Hello Jay,

    For CRM 4.0, you can create a custom dialog page when closing the service activity and the user gets to rate it.

    For CRM 2011, use dialogs.


    Cornel Croitoriu - Senior Software Developer - www.Biz-Forward.com | www.Croitoriu.NET
    Friday, February 18, 2011 7:46 AM
  • This is the method I am currently trying.

    I am opening a form dialog that I have saved in the ISV folder.  I am having trouble getting the SOAP requests to work, the form prompts for a username and password when it tries to send the request.

    Tuesday, February 22, 2011 2:33 PM
  • Also, no username or password that I enter will complete the webservices request.

    It is an on-premise CRM 4 installation.  I pass the authentication header, and the object's GUID, as URL parameters to my custom form page (hosted in the ISV folder).  Here is the request:

     

    function getData (){ 
    
      var authenticationHeader = authenticationHeader; 
    
      // Prepare the SOAP message.
      var xml =  "<?xml version='1.0' encoding='utf-8'?>"+ 
            "<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'"+
            " xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'"+
            " xmlns:xsd='http://www.w3.org/2001/XMLSchema'>"+ authenticationHeader+ 
            "<soap:Body>"+ 
            "<Retrieve xmlns='http://schemas.microsoft.com/crm/2007/WebServices'>"+ 
            "<entityName>equipment</entityName>"+ 
            "<id>"+ GUID +"</id>"+ 
            "<columnSet xmlns:q1='http://schemas.microsoft.com/crm/2006/Query' xsi:type='q1:ColumnSet'>"+ 
    					"<q1:Attributes>"+ 
    						"<q1:Attribute>new_city</q1:Attribute>"+ 
    					"</q1:Attributes>"+ 
            "</columnSet>"+ 
            "</Retrieve>"+ 
            "</soap:Body>"+ 
            "</soap:Envelope>";
            
      // Prepare the xmlHttpObject and send the request.
      var xHReq = new ActiveXObject("Msxml2.XMLHTTP");
      xHReq.Open("POST", "../MSCRMServices/2007/CrmService.asmx", false);
      xHReq.setRequestHeader("SOAPAction","http://schemas.microsoft.com/crm/2007/WebServices/Retrieve");
      xHReq.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
      xHReq.setRequestHeader("Content-Length", xml.length);
      xHReq.send(xml);
      // Capture the result.
      var resultXml = xHReq.responseXML;
      alert(resultXml.selectSingleNode("//q1:new_city").nodeTypedValue);
    }
    

    Tuesday, February 22, 2011 4:58 PM
  • I figured out the error, for some stupid reason I re-decalred the variable 'authenticationHeader'...

     

    I am still interested in alternative opinions about how to do this.

    Tuesday, February 22, 2011 6:59 PM
  • So i came up with an alternate idea.

     

    It is a bit less elegant, a bit easyier to implement, and 100% user adjustable.

    I created a new entity for the 'surveys' and defined a 1:n relationship between equipment and the survey.  I then use a URL addressable form to automaticly open the survey at the end of a service activity.

     

    Now there is a history of the ratings, so I can report on it.

    • Marked as answer by Jay C. _ Tuesday, February 22, 2011 8:31 PM
    Tuesday, February 22, 2011 8:31 PM