Community
Showing results for 
Search instead for 
Do you mean 
Reply

Problems to use the EmailMerge-Method from the UICorrespondenceManager Class

Accepted Solution Solved
Copper Contributor
Posts: 32
Country: Germany
Accepted Solution

Problems to use the EmailMerge-Method from the UICorrespondenceManager Class

Hi,

 

I tried to use the EmailMerge-Method from the UICorrespondenceManager Class the following way:

 

--------------------------

 

           Act.Framework.ActFramework ActFr = new Act.Framework.ActFramework();
            ActFr.LogOn(xmlPADFile, userName, password);

            IUnityContainer container = new UnityContainer();
            UICorrespondenceManager UIManager = new UICorrespondenceManager(ActFr,container);
            UIManager.EmailMerge();           

 

-------------------------

 

VISUAL Studio tells me that this is not possible because:

Act.Framework.PermissionDeniedException - the user has no rights to perform this action.

 

Why?

 


Accepted Solutions
Solution
Accepted by topic author benoit22
‎09-25-2015 03:20 AM
Copper Contributor
Posts: 32
Country: Germany

Re: Problems to use the EmailMerge-Method from the UICorrespondenceManager Class

[ Edited ]

At last I used the Mail-method instead of Email-method.

It's more or less the same.

 

Act.UI.Correspondence.UICorrespondenceManager sendmail= new Act.UI.Correspondence.UICorrespondenceManager(ActFr, container);
sendmail= ActApp.UICorrespondenceManager;

sendmail.MailMerge();

 

 

 

 

Problem solved for me.

View solution in original post


All Replies
Employee
Posts: 1,163
Country: USA

Re: Problems to use the EmailMerge-Method from the UICorrespondenceManager Class

Could be a couple of things. The first being the user that you're logging in as doesn't have permission to perform a mail merge the other being that an email client hasn't been setup.

Matthew Wood
Act! SDK Support
Community Moderator
Copper Contributor
Posts: 32
Country: Germany

Re: Problems to use the EmailMerge-Method from the UICorrespondenceManager Class

[ Edited ]

That problem will be solved if I write instead of

 

Act.Framework.ActFramework ActFr = new Act.Framework.ActFramework();
            ActFr.LogOn(xmlPADFile, userName, password);

            IUnityContainer container = new UnityContainer();
            UICorrespondenceManager UIManager = new UICorrespondenceManager(ActFr,container);
            UIManager.EmailMerge();          

 

 

this

 

   this.ActApplication.UICorrespondenceManager.EmailMerge();

 

(

    Realising an plugin:

 

 

  // You use the IPlugin Interface

  // a private property of the IPlugin Interface is the ActApplication class

 

   private ActApplication ActApp;

 

  //also the OnUnload method
  //which needs the ActApplication class

 

   virtual void OnLoad( ActApplication ActApp )

   {

      this.ActApp= ActApp;

      // now or later you can use all the manager classes which are properties of the ActAplication class e. g.

     this.ActApp.UICorrespondenceManager.EmailMerge();

   }

....

 

 

 

)

 

But now I have a new problem.

If I use the EmailMerge method I get the following message:

 

"The email group contains no pages, please set the CurrentGroup of the the WizardSheet"

 

Which WizardSheet?

 

 

 

Bronze Super Contributor
Posts: 1,231
Country: USA

Re: Problems to use the EmailMerge-Method from the UICorrespondenceManager Class

Stab in the dark...

 

Maybe the CurrentGroup is referring to the ApplicationState CurrentGroup?

What happens if you navigate to the groups detail view then run your code?

 

-- Jim Durkin

Solution
Accepted by topic author benoit22
‎09-25-2015 03:20 AM
Copper Contributor
Posts: 32
Country: Germany

Re: Problems to use the EmailMerge-Method from the UICorrespondenceManager Class

[ Edited ]

At last I used the Mail-method instead of Email-method.

It's more or less the same.

 

Act.UI.Correspondence.UICorrespondenceManager sendmail= new Act.UI.Correspondence.UICorrespondenceManager(ActFr, container);
sendmail= ActApp.UICorrespondenceManager;

sendmail.MailMerge();

 

 

 

 

Problem solved for me.