How to add Create Button in Relate popup mode

Dear experts,
I am trying to add Create button in Relate Campaign on Pop up mode selection as like below image/attachment image.

Search lot in internet. Could not able to make as i am new. Please advice some solution for this.

Regards,
Dev

Hi experts,
Any luck for Suggestions…

Dear Expert, Can i expect some reply on this query ??

These forums are really slow and empty on weekends. Don’t expect much response on those days, you better post on Mondays or wait more patiently : - )

Normally the button that takes you to that screen (on subpanels) has a button right next to it that creates a new record. So you wouldn’t actually need that button there.

If you really must create that button there, I don’t really know the answer to your question, but if you read this
https://github.com/salesagility/SuiteCRM/issues/925

you will get an idea of which files you can look for, and how things are called, and then you can try Googling your way towards a solution. (then come back here and share with us!)

I tried searching in internet for solution. But bad luck that could not find this query. I just want to add button to create campaign in popup search.

I’ve started looking into this today,
(for Meetings module)
If I figure out anything useful, I’ll post it here

From what I can tell, you need to make a FormBase file,
and reference it from within the popupdef
(taken from Accounts popupdef)

...
    'create' => array(
        'formBase' => 'AccountFormBase.php',
        'formBaseClass' => 'AccountFormBase',
        'getFormBodyParams' => array('', '', 'AccountSave'),
        'createButton' => 'LNK_NEW_ACCOUNT',
    ),

I’ll be making my own now for Meetings module

I also found the following thread

The Above will add the button,
but you may need to edit the handleSave function in your modules FormBase class.

For Example
near the end you will find this conditional

if (!empty($_POST['is_ajax_call'])

That executes

            $json = getJSONobj();
            echo $json->encode(array('status' => 'success', 'get' => ''));

the meetings module’s handleSave implementation exits immediately at this stage, you need to make sure it returns null instead.

It looks as if the popup then has the search parameters populate and I’d imagine the first option in the list would be automatically selected, however searching on a datetime field like Meetings Start Date does not seem to work from a popup window.