locked
possible to create a duplicate case through rest sdk? RRS feed

  • Question

  • Hello, is it possible to create a duplicate case through the REST SDK?  The name of the relationship for this is "new_incident_incident_Duplicate." Here's some basic REST SDK update code:

        //use rest update service to associate duplicate case
        var incidentId = '###';
        var dupCaseId = '###';
        var incident = {};
        //any way to specify relationship and dup incident on incident object at this point?
        SDK.REST.updateRecord(
               incidentId,
               incident,
               "Incident",
               function () {
                     var dupCaseNumber = GetCaseNumber(dupCaseId);
                     var message = 'Duplicate case #' + dupCaseNumber + ' is now associated with this case';
                     alert(message);
               },
               function(error) {
               }
          );    
    Wednesday, February 26, 2014 11:18 PM

Answers

  • figured out how I will approach: set incident.new_params = 'duplicate|' + caseNumber and handle the association in the plugin
    Thursday, February 27, 2014 12:23 AM