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

Offline MJaskowski

  • Newbie
  • *
  • Posts: 27
  • 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: 126
  • Karma: 13
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;

Offline MJaskowski

  • Newbie
  • *
  • Posts: 27
  • Karma: 0
Re: Create tab in InteractionDetailsRegion based on Disposition Code tab
« Reply #17 on: December 18, 2018, 06:11:22 AM »
Pete thank you for your help, that was it! :)

I suppose the last question is, can I get anywhere, any description of Style resources?

For example: I have DeleteDispositionButton, for this button we have style "vistaSmallButtonStyle".
e.g. Style="{DynamicResource vistaSmallButtonStyle}

Can I get somewhere list of styles for concrete controls?

Regards,
Matt

Offline MJaskowski

  • Newbie
  • *
  • Posts: 27
  • Karma: 0
Re: Create tab in InteractionDetailsRegion based on Disposition Code tab
« Reply #18 on: December 21, 2018, 07:59:55 PM »
Any ideas?

Additionaly  I have trouble with one else situation. I try handle ApplicationClose command:

Code: [Select]
container.Resolve<ICommandManager>().CommandsByName["ApplicationClose"].Insert(0, new CommandActivator() { CommandType = typeof(ApplicationCloseCustomCommand) });

Question is, how is implementing Interaction?

When I used
Code: [Select]
container.Resolve<ICommandManager>().CommandsByName["BundleClose"].Insert(0, new CommandActivator() { CommandType = typeof(MarkDoneCustomCommand) });
inside MarkDoneCustomCommand I can use IIteraction interface, in ApplicationCloseCustomCommand I can't.
Body for both class is the same, exactly the same.

What determine Interaction?

Regards
Matt