Page 1 of 1

FormDocumentMailToClicked - breakout

PostPosted: Tue Nov 28, 2023 1:56 pm
by Riyaz
Hi There

We are currently converting some version 6 breakouts to plugins, there are some breakouts for FormDocumentMailToClicked example one in Sales Order Maintenance, just not sure where is this linked to so we can create the respective plugin.

Here's another one FormCustomMenuClicked on Sales Order Maintenance again, tried to see if this is related to Custom tab with some MsgBox prompts, but cant see anything triggering it.

Can you pls guide

Re: FormDocumentMailToClicked - breakout

PostPosted: Tue Nov 28, 2023 2:57 pm
by SBarnes
If memory serve correct there is already a sample plugin in version 7 already called Sales Order Custom Email that shows how to customise the email from a sales order.

As for the other one Jiwa 6 used to let you add custom menu items and then react to them being clicked you can achieve the same thing by adding buttons to the ribbon the code below is a fairly simple example of doing it

Code: Select all
public class FormPlugin : System.MarshalByRefObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaFormPlugin
{

    public override object InitializeLifetimeService()
    {
        // returning null here will prevent the lease manager
        // from deleting the Object.
        return null;
    }

    public void SetupBeforeHandlers(JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm JiwaForm, JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin)
    {
    }

    public void Setup(JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm JiwaForm, JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin)
    {
      
      
      if(JiwaForm is JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.SalesOrderEntryForm)
      {
         JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.SalesOrderEntryForm uiform = (JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.SalesOrderEntryForm)JiwaForm;
         Infragistics.Win.UltraWinToolbars.RibbonGroup bgroup = new Infragistics.Win.UltraWinToolbars.RibbonGroup("Hello");
         bgroup.Caption = "Hello";
         uiform.UltraToolbarsManager1.Ribbon.Tabs["Main"].Groups.Add(bgroup);
         Infragistics.Win.UltraWinToolbars.ButtonTool btnImport = new Infragistics.Win.UltraWinToolbars.ButtonTool("Say Hello");
                          
           btnImport.SharedProps.Caption = "Say Hello";
          btnImport.ToolClick += uiForm_Toolbar_ToolClick;

           uiform.UltraToolbarsManager1.Tools.Add(btnImport);
         bgroup = uiform.UltraToolbarsManager1.Ribbon.Tabs["Main"].Groups["Hello"];
           bgroup.Tools.AddTool("Say Hello");
           bgroup.Tools["Say Hello"].InstanceProps.MinimumSizeOnRibbon = Infragistics.Win.UltraWinToolbars.RibbonToolSize.Large;
         
      }      
      
      
      
    }
   
   
   
   private  void uiForm_Toolbar_ToolClick(object sender, EventArgs args)
   {
      System.Windows.Forms.MessageBox.Show("Hello World");
   }
}
#

Re: FormDocumentMailToClicked - breakout

PostPosted: Tue Nov 28, 2023 4:16 pm
by Riyaz
Thanks Stuart

Thought so but am not able to trigger the function of "Form Document MailTo Clicked" - breakout , thought it was referring to Docuemnts tab

Re: FormDocumentMailToClicked - breakout  Topic is solved

PostPosted: Thu Nov 30, 2023 11:28 am
by Mike.Sheen
Riyaz wrote:Thanks Stuart

Thought so but am not able to trigger the function of "Form Document MailTo Clicked" - breakout , thought it was referring to Docuemnts tab


The legacy version 6 FormDocumentMailToClicked breakout would need to be implemented in a version 7 plugin which adds a context menu option to the documents grid of the form(s) of interest. The handler for the context menu item click would then simply create a new email maintenance form and pre-populate the attachments with the document selected.

Re: FormDocumentMailToClicked - breakout

PostPosted: Thu Nov 30, 2023 11:49 am
by Riyaz
Thanks Mike

How would I trigger this in Jiwa 6 to see what this actually does, the breakout seem to be opening an Outlook email but am not sure where to trigger it from in version 6.

Re: FormDocumentMailToClicked - breakout

PostPosted: Fri Dec 01, 2023 3:29 pm
by Mike.Sheen
Riyaz wrote:Thanks Mike

How would I trigger this in Jiwa 6 to see what this actually does, the breakout seem to be opening an Outlook email but am not sure where to trigger it from in version 6.


Right click on a row in the document grid and a context menu appears - select the "Email To..." context menu item.