Author Topic: Create tab in InteractionDetailsRegion based on Disposition Code tab  (Read 462 times)

Offline MJaskowski

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Re: Create tab in InteractionDetailsRegion based on Disposition Code tab
« Reply #15 on: December 07, 2018, 12:04:12 AM »
Thank you cavagnaro for reply,

Your comments were very useful - unfortunately still I have problem with use isMandatory option.
In case where we use DispositionCode tab, if you don't tick any position then you'll obtain orange alert "Disposition Code is mandatory value" ( or something similar ).
Can I achieve it for my own tab ( "own tab" I mean not DispositionCodeEx, only own with TreeView where I can select option from list )?

Regards
Matt
« Last Edit: December 07, 2018, 12:06:30 AM by MJaskowski »

Offline PeteHoyle

  • Full Member
  • ***
  • Posts: 104
  • Karma: 8
Re: Create tab in InteractionDetailsRegion based on Disposition Code tab
« Reply #16 on: December 07, 2018, 07:06:29 PM »
There are a few different ways you could do this, probably the easiest way is to create a custom command and add it to the BundleClose command

Code: [Select]
container.Resolve<ICommandManager>().CommandsByName["BundleClose"].Insert(0, new CommandActivator() { CommandType = typeof(MarkDoneCustomCommand) });
Your custom command will be called when the Mark Done button is pressed.

In your custom command you then need to check if IsMandatory is enabled, if so you then need to check if there is a value set in your custom view, if not then return true and display a message, returning true mean that the BundleClose command does not continue..

Code: [Select]
if(interaction.DispositionCode.IsMandatory)
{
if (!myCustomViewValueSet)
{
                //Display a message explaining that no value is selected in the custom view.
               //Return True means the chain of command will not continue
return true;
}
}
//return false and the chain of command will continue
return false;