If you inspect the CRCaseMaint source code, you won’t find an Open method. The Open action actually comes from CaseWorkflow, an extension of CRCaseMaint, which handles the workflow function. Additionally, the Open action is not a graph action, but rather a workflow action. Here’s where it’s defined:
var actionOpen = context.ActionDefinitions.CreateNew(ActionNames.Open, a => a
.WithFieldAssignments(fields =>
{
fields.Add<CRCase.isActive>(f => f.SetFromValue(true));
fields.Add<CRCase.resolution>(f => f.SetFromFormField(formOpen, _fieldReason));
fields.Add<CRCase.ownerID>(f => f.SetFromFormField(formOpen, _fieldOwner));
fields.Add<CRCase.resolutionDate>(f => f.SetFromValue(null));
})
.DisplayName("Open")
.WithCategory(categoryProcessing)
.MapEnableToUpdate()
.WithForm(formOpen)
.WithPersistOptions(ActionPersistOptions.PersistBeforeAction)
.IsExposedToMobile(true)
.MassProcessingScreen<UpdateCaseMassProcess>());
Because it’s defined this way, overriding it will be much trickier.
One way to do it would be to extend the default workflow and update the Open action to include your changes. The problem is that workflow code is very restrictive by nature and significantly different than normal event / action code.
The alternative would be to add a brand-new graph action on CRCaseMaint called Open which would do what you want. Then you could update the workflow code to include your new action as an existing graph action rather than creating a new workflow action. In this way, I believe both could exist simultaneously.
I’m afraid this is probably more complicated than you were expecting.
I would love for someone to tell me there’s a much simpler option.