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

Offline MJaskowski

  • Newbie
  • *
  • Posts: 27
  • Karma: 0
Re: Create tab in InteractionDetailsRegion based on Disposition Code tab
« Reply #15 on: December 06, 2018, 03:04:12 PM »
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 06, 2018, 03:06:30 PM 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, 10:06:29 AM »
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]container.Resolve<ICommandManager>().CommandsByName["BundleClose"].Insert(0, new CommandActivator() { CommandType = typeof(MarkDoneCustomCommand) });[/code]

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]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;[/code]

Offline MJaskowski

  • Newbie
  • *
  • Posts: 27
  • Karma: 0
Re: Create tab in InteractionDetailsRegion based on Disposition Code tab
« Reply #17 on: December 17, 2018, 09:11:22 PM »
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, 10:59:55 AM »
Any ideas?

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

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

Question is, how is implementing Interaction?

When I used
[code]
container.Resolve<ICommandManager>().CommandsByName["BundleClose"].Insert(0, new CommandActivator() { CommandType = typeof(MarkDoneCustomCommand) });
[/code]
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