Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Map field from opportunities to invoices
Hi Ronan. Thank you for collaborate with coreBOS project

ronankeane Wrote:Hi there.

Using ‘Opportunity No.’ as the main project number / reference.

I need to include it in an invoice, but I am having difficulty bringing it into the invoice module.

I think I remember doing something similar before in the editviewutils.php file by manipulating the getConvertQuoteToInvoice function.

But, here the field I need is in the opportunities / potential module, and only the opportunity name is brought into quotes / salesorders module.

Can anyone advise where I should be looking please?

If the Opportunity No is your identifier you have to unset the actual entity identifier "Opportunity Name". With the next script you can unset the potentialname field and set the potential_no, after that you will can see the potential_no in all the registers that are related with Opportunity.

// Turn on debugging level
$Vtiger_Utils_Log = true;

require_once 'include/utils/utils.php';

$module = Vtiger_Module::getInstance('Potentials');

$module->unsetEntityIdentifier();//This unset the potentialname like a entity identifeir

$field = VTiger_Field::getInstance('potential_no',$module); //Now you get the field that you want to entity identifier

$module->setEntityIdentifier($field);//And finally you set this field.


ronankeane Wrote:PS Has anyone done up a logout button yet?

The logout button exist is on top right, is a door with arrow.

ronankeane Wrote:Also, should 'fieldexpressions' now be used over workflow? What is the thinking behind this? Just started working with CoreBOS. Look forward to contributing.

The field formulas are dead, we will try to delete this code because the workflows are more powerfull than this, and is better to add more functuonallity to workflows than support this old code.

Thank you , again.

Messages In This Thread
Re: Map field from opportunities to invoices - omarllorens - 06-24-2014, 08:02 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)