generate letter custom module

Hi Guys,

I’m looking to add a generate letter button to a custom module, I have been following this post here

I have followed it as best as i can, i have gotten the button to show, I have disabled AJAX now however i am stuck with the view.detail.php, my module doesn’t have a view.detail.php so as someone advised i take it from the contacts or leads and change the values to suit my own, which I think I have done, however it doesn’t seem to work, nothing happens at all. here is the code from the view.detail.php


<?php
class CustomPDL_GroanViewDetail extends ViewDetail{
    public function display(){
        global $sugar_config;

        require_once('modules/AOS_PDF_Templates/formLetter.php');
        formLetter::DVPopupHtml('PDL_Groan');

        parent::display();
    }
}
?>

Any help would be greatly appreciated.

Thanks
Ryan

Two things:

  1. where exactly did you put this file?

  2. It seems you skipped the initial reference to


require_once('include/MVC/View/views/view.detail.php');

this appears in the original files I’m seeing in Leads, Contacts, etc.

Pay attention to your php_errors.log, it should be telling you what you’re doing wrong.

1 Like
  1. I put it in “custom/modules/PDL_Groan/views/view.detail.php”

  2. Was that from the “how to extend views” link because it would always send me somewhere else.

You are right about the php_error.log,

I’ll give it a try,

Thanks again

Suite! we got that working PGR, I am a little annoyed i couldn’t find that little bit myself, as you said about what you found in the leads, i did copy the view.detail.php from the leads and modify it for PDL_Groan as some in that thread suggested, but i got a white screen, which probably way php as you suggested in the other thread, now to go work on that one.

you can close this now, and Thank you once again!