Display Action Callback provides you a mechanism to disable any of the action buttons on the cart. Following are few examples of custom buttons that you can disable:
Abandon
Approvals
Generate
Quick Save
To use the Display Action Callback you must create a custom C# class that implements the IDisplayActionCallback interface and register the custom C# class with Display Action Callback Class. You must write your custom logic in the custom C# class.
The following method is available in the IDisplayActionCallback interface:
You can use this method to execute display action.
Example
This is just a sample callback custom class to hide the visibility of the Abandon and Generate action buttons on the cart page. You may change the custom class to fit your business requirements
using Conga.Revenue.Common.Callback.Messages;
using Conga.Revenue.Common.Callback.Models;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Conga.Revenue.Common.Callback
{
/// <summary>
/// Interface for display action callback
/// </summary>
public interface IDisplayActionCallback
{
/// <summary>
/// Executes the display action.
/// </summary>
/// <param name="actionRequest">The action request.</param>
/// <returns></returns>
Task ExecuteDisplayAction(IActionRequest actionRequest);
}
}