Configuring the Retry Button
Real-time sync failures are logged in the Error Log field in the Queue Outbound record. You can create a Retry button in the record and expose it to the Queue Outbound object in Salesforce to easily rerun real-time sync.
* 
The steps in this procedure are for use with the Salesforce Classic UI. For details on how to configure a Quick Action to rerun real-time sync in the Salesforce Lightning Experience UI, see Configuring Retry Quick Actions for Lightning Experience.
To configure the Retry button:
1. On the Salesforce Classic Setup page, in the left pane, click Build > Create > Objects, and then on the Custom Objects page, click SB_Queue_Outbound.
2. Under Buttons, Links, and Actions , click Create New Button or Link, and then under Custom Button or Link Edit, complete the fields as follows.
Field
Value
Label
Retry
Display Type
Detail Page Button
Behavior
Execute JavaScript
Content Source
OnClick JavaScript
3. Add the following code:
{!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/30.0/apex.js")}
var outboundRecordId = '{!SVMXC__SM_SB_Queue_Outbound__c.Id}';
var status = '{!SVMXC__SM_SB_Queue_Outbound__c.SVMXC__SM_Status__c}';
var eventType = '{!SVMXC__SM_SB_Queue_Outbound__c.SVMXC__SM_Event_Type__c}';
var sObjectRecordId = '{!SVMXC__SM_SB_Queue_Outbound__c.SVMXC__SM_Record_to_Dispatch__c}';
var objectName = '{!SVMXC__SM_SB_Queue_Outbound__c.SVMXC__SM_Object_Name__c}';
var payload = '{!JSENCODE(SVMXC__SM_SB_Queue_Outbound__c.SVMXC__SM_Payload__c)}';
sforce.apex.execute("SVMXSB.SB_SendFailedRecords", "retryFailedRecord", {outboundRecordId, status, eventType, sObjectRecordId, objectName, payload});
window.location.reload(true);
4. Save the record, and then navigate to the Edit Page Layout page for the Outbound Queue object and expose the newly added button to the layout.
Was this helpful?