Community
Showing results for 
Search instead for 
Do you mean 
Reply

Custom Button

Accepted Solution Solved
Copper Super Contributor
Posts: 478
Country: Australia
Accepted Solution

Custom Button

Hi all

 

Is it possible to have a custom button that when clicked takes the number from a field and +1 then write thenew number in the field

 

I basically have multiple areas to report on small activities done for clients

 

How would this be achieved either at the contact level or contact list level?

 

Thanks


Jason Dawson Financial Planning
Brisbane | Australia - JDFP Home Page

Act Ver - Act! Premium Version 17.1.169.0, Hot Fix 3
OS - Windows 7 (stand alone machine)
MS Office - Enterprise 2007
Phone - Samsung Galaxy s6

Accepted Solutions
Solution
Accepted by topic author JasonD
‎09-25-2015 03:20 AM
Copper Super Contributor
Posts: 52
Country: United_Kingdom

Re: Custom Button

Hi Jason,

 

I've attached a class to this post that should help. 

 

You should only need to amend the MenuHandler method.

 

I hope this helps,

 

Kind regards,

 

 

Russell

View solution in original post


All Replies
Copper Super Contributor
Posts: 52
Country: United_Kingdom

Re: Custom Button

Hi Jason,

 

This is certainly possible using the Act! SDK. If you haven't already got a copy of the SDK you can obtain it here:

http://www.act.com/partners/development-partner-program/sdk/download/

 

I'd recommend you start by taking a look at the Customization Cookbook and the section titled Adding a new menu and handler. This should give you a good grasp of adding new menu item and buttons.

 

In regards to editing specific contact fields, it would look something like this:

 

Act.Framework.Contacts.Contact c = oApp.ApplicationState.CurrentContact;
            int newVal = Convert.ToInt32(c.Fields["MYFIELD", true].ToString()) + 1;
            c.Fields["MYFIELD", true] = newVal;
            c.Update();

I hope this helps.

 

Regards,

 

 

Russell

 

 

Copper Super Contributor
Posts: 478
Country: Australia

Re: Custom Button

Thanks for that its a lot of suff but i will go through it all and see what i can get to work, it should be simple as i jsut want a "log button"

 

Thanks again


Jason Dawson Financial Planning
Brisbane | Australia - JDFP Home Page

Act Ver - Act! Premium Version 17.1.169.0, Hot Fix 3
OS - Windows 7 (stand alone machine)
MS Office - Enterprise 2007
Phone - Samsung Galaxy s6
Copper Super Contributor
Posts: 478
Country: Australia

Re: Custom Button

Well got to say the instructions in the SDK are not overly helpful

Jason Dawson Financial Planning
Brisbane | Australia - JDFP Home Page

Act Ver - Act! Premium Version 17.1.169.0, Hot Fix 3
OS - Windows 7 (stand alone machine)
MS Office - Enterprise 2007
Phone - Samsung Galaxy s6
Copper Super Contributor
Posts: 478
Country: Australia

Re: Custom Button

Can i ask what may be a stupid question but your code above is a very different structure to that shown in the sample code in the SDK

Jason Dawson Financial Planning
Brisbane | Australia - JDFP Home Page

Act Ver - Act! Premium Version 17.1.169.0, Hot Fix 3
OS - Windows 7 (stand alone machine)
MS Office - Enterprise 2007
Phone - Samsung Galaxy s6
Copper Super Contributor
Posts: 478
Country: Australia

Re: Custom Button

sorry i had the wrong sample loaded


Jason Dawson Financial Planning
Brisbane | Australia - JDFP Home Page

Act Ver - Act! Premium Version 17.1.169.0, Hot Fix 3
OS - Windows 7 (stand alone machine)
MS Office - Enterprise 2007
Phone - Samsung Galaxy s6
Copper Super Contributor
Posts: 478
Country: Australia

Re: Custom Button

Ok got it all fixed added the new code made the edits and worked out how to compile the code

I then moved the dll file into the plugin folder

and .... nothing

any idea where it may have gone?

Jason Dawson Financial Planning
Brisbane | Australia - JDFP Home Page

Act Ver - Act! Premium Version 17.1.169.0, Hot Fix 3
OS - Windows 7 (stand alone machine)
MS Office - Enterprise 2007
Phone - Samsung Galaxy s6
Copper Super Contributor
Posts: 86
Country: United_Kingdom

Re: Custom Button

Hi Jason,

 

It sounds like the plugin is either not being loaded by Act! or there's a mistake in your code.

 

To check if it's the former you can look in a file called DependentDlls.xml to see whether it references your plugin.

If it does then Act! has blocked your plugin because it detected a problem or the addin has been manually disabled.

You can safely delete DependentDlls.xml to force Act! to reload all plugins and see if now works.

 

The file can be found in your Windows user Application Data folder as follows:

 

%appdata%\ACT\ACT Data\DependentDlls.xml

 

 

Alternatively if you're on Act! v16.1 then you can go to Tools > Manage Add-ons and ensure your plugin is loaded.

 

 

If neither of these work then it suggests there is a problem in your code.

Have you got any errors logs that you can check?

 

____________________________________________________________

Unfortunately I no longer work for Swiftpage International. Please do not send any queries to this account.
Copper Super Contributor
Posts: 478
Country: Australia

Re: Custom Button

Thanks for your reply Sam, i muddled my way through that from some other articles on here, it does show up in the dependentdll file every time, i dont think its my code per say but maybe how i am coding it??? as i did the sample code with no edits and same thing happened

 

In VS i code in as "C#" only because thats what the sample file is, then as a "Class Library" output

 

It was defaulting to .NET 4 Client and i read an article here that it had to be just .NET4 and i have also tried .NET 3.5 and .NET 3


Jason Dawson Financial Planning
Brisbane | Australia - JDFP Home Page

Act Ver - Act! Premium Version 17.1.169.0, Hot Fix 3
OS - Windows 7 (stand alone machine)
MS Office - Enterprise 2007
Phone - Samsung Galaxy s6
Bronze Super Contributor
Posts: 1,231
Country: USA

Re: Custom Button

Inside the DependentDLL file is the reason why your plugin is being blacklisted.

You can use C:\Program Files (x86)\ACT\Act for Web\LogViewer.exe to read the contents of the DependentDLL file.

 

-- Jim Durkin