FormDocumentMailToClicked - breakout  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

FormDocumentMailToClicked - breakout

Postby Riyaz » Tue Nov 28, 2023 1:56 pm

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
Riyaz
Kohai
Kohai
 
Posts: 233
Joined: Wed Dec 02, 2015 2:05 pm
Topics Solved: 2

Re: FormDocumentMailToClicked - breakout

Postby SBarnes » Tue Nov 28, 2023 2:57 pm

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");
   }
}
#
Regards
Stuart Barnes
[email protected]
SBarnes
Shihan
Shihan
 
Posts: 1607
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 174

Re: FormDocumentMailToClicked - breakout

Postby Riyaz » Tue Nov 28, 2023 4:16 pm

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
Riyaz
Kohai
Kohai
 
Posts: 233
Joined: Wed Dec 02, 2015 2:05 pm
Topics Solved: 2

Re: FormDocumentMailToClicked - breakout  Topic is solved

Postby Mike.Sheen » Thu Nov 30, 2023 11:28 am

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.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2434
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 749

Re: FormDocumentMailToClicked - breakout

Postby Riyaz » Thu Nov 30, 2023 11:49 am

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.
Riyaz
Kohai
Kohai
 
Posts: 233
Joined: Wed Dec 02, 2015 2:05 pm
Topics Solved: 2

Re: FormDocumentMailToClicked - breakout

Postby Mike.Sheen » Fri Dec 01, 2023 3:29 pm

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.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2434
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 749


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 2 guests

cron