Add button to Account - DetailView calling a url (with a webservice behind)

Hi,

I want to add a button to the detailview of the accounts-module. OnClick a call of a url should happen, like if you click on a link.
I found modules/Accounts/metadata/detailviewdefs.php contains informations about the existing buttons, but I couldn´t how to add my button.

I was also looking for a solution in this forum and I found a thread, but it didn´t work for me: Link

Can someone give me a tip?

Regards, MT

I found a Solution. If someone else wants so add a action-button:

I took the code from SugarCRM-Guide.

  • In \custom\modules\Contacts\metadata\detailviewdefs.php
  • Find 'buttons' =>
  • Find 'AOS_GENLET' =>

In the line before 'AOS_GENLET' added the button:

		  5 =>
          array (
            'customCode' => '<form action="index.php" method="POST" name="CustomForm" id="form">
<input type="hidden" name="customFormField" name="customFormField" value="CustomValue">
<input id="SubmitCustomFormButton" title="Submit Custom Form Button" class="button" type="submit" name="SubmitCustomFormButton" value="Submit Custom Form Button">
</form>',
          ),

After quick repair you will find a button “Submit Custom Form Button” in contacts-detailsview if you click on actions. The button will lead you to index.php.