[Vtigercrm-developers] Create Sales Order from Potential?

Alan Lord (News) alanslists at gmail.com
Wed Apr 6 03:32:55 PDT 2011


On 05/04/11 15:35, Alan Lord (News) wrote:
> One of our customers wants to add an action button to the Potential
> Detail View that will create a Sales Order, and copy across pertinent
> information.
>
> I'm wondering if anyone has done something similar before so I don't
> have to start from scratch?

Partially answering myself, I discovered that the
"Add Sales Order" button in the Sales Order Block below a Detail View of 
an Enquiry does pretty much what I need.

But it is a call to some Javascript.

<input type="submit" value="Add Sales Order" name="button" 
onclick="this.form.action.value=&quot;EditView&quot;;this.form.module.value=&quot;SalesOrder&quot;" 
class="crmbutton small create" title="Add Sales Order">

So could I use repeat this call in the vtlib special Link type feature?

include_once('vtlib/Vtiger/Module.php');
$moduleInstance = Vtiger_Module::getInstance('Potential');
$moduleInstance->addLink(
'DETAILVIEW',
'Add Sales Order',
'call to javascript function'
);

Cheers

Al

-- 
The Open Learning Centre
http://www.theopenlearningcentre.com




More information about the vtigercrm-developers mailing list