Remedyforce IB Button update via xMatters

Not Yet Reviewed

Context

This code is for a custom button to fire a Remedyforce ticket to the xMatters Integration Builder. 

Note: This requires the xMattersreq class found here

Usage

{!REQUIRESCRIPT ("/soap/ajax/13.0/connection.js")};
{!REQUIRESCRIPT("/soap/ajax/30.0/apex.js")};

caseid = '"Case ID":' + '"' + "{!BMCServiceDesk__Incident__c.BMCServiceDesk__FKIncidentId__c}" + '"';
priority = '"Priority":' + '"' + "{!BMCServiceDesk__Incident__c.BMCServiceDesk__Priority_ID__c}" + '"';
status = '"Status":' + '"' + "{!BMCServiceDesk__Incident__c.BMCServiceDesk__FKStatus__c}" + '"';

recordid = '"ID":' + '"' + "{!BMCServiceDesk__Incident__c.Id}" + '"';
accountname = '"Account Name":' + '"' + "{!BMCServiceDesk__Incident__c.BMCServiceDesk__FKAccount__c}" + '"';
description = '"Description":' + '"' + "{!BMCServiceDesk__Incident__c.BMCServiceDesk__incidentDescription__c}" + '"';
payload = '{' + recordid + ',' + caseid + ',' + description + ',' + priority + ',' + accountname + ',' + status + '}';

endpoint = 'https://instance.na2.xmatters.com/api/integration/1/functions/4fc88486-641e-4314-8dfa-819011f11b05/triggers';

sforce.apex.execute("xMattersreq","xRESTCall",{endpoint:endpoint, payload:payload});

0

Comments

0 comments

Please sign in to leave a comment.

Didn't find what you were looking for?

New post