How to add Third-parties information (complementary attribute), that will be transferred in Proposals and Sales orders?

Hello,

I would like to make a complementary attribute, which is string and the same attribute code to appear at Proposals and Sale orders to this Third party. I made one complementary attribute in the Third party module and then I made the same attribute code in Proposal module and Sale Order module. The problem is when I fill the information in the attribute of the Third party is not appearing in the proposal. I use the same attribute code. If I fill information in this attribute in the Proposal, the information is transferred in Sales Order. But if I fill the same attribute in the Third party it did not transfer information.

Could you please give me some advices how to proceed?

Thank you.

Hello,

The transfert of complementary informations is only from proposal to order to sales
There is no transfert from third party to proposal/order/sale.

For you, you need to use computed field in proposal that will load the third party complementary with this kind of syntaxe :

(($reloadedobj = new Societe($db)) && ($reloadedobj->fetchNoCompute($objectoffield->rowid)))
) ? $reloadedobj->array_options[‘options_xxxxxxxxxxxxxxxxxxxxxxxxx’] : 'Not found'
1 Like

Hello,

Thank you for your swift feedback. I have to apologize ,but I haven’t got knowledge in PHP. I tried to change options_xxxxxxxxxxxxxxxxxxxxxxxxx with my attribute code from third party, but without success. Am I on right way or for this I will need some deeper knowledge?

Hello,

what is the name of your attribute ?
You need to replace only the xxxxx part with your attribute name.

Try:

(($reloadedobj = new Societe($db)) && ($reloadedobj->fetchNoCompute($objectoffield->socid) > 0)) ? $reloadedobj->array_options['options_xxxxxx'] : 'Not found'

Hello,

Thank you for your help. It work perfect.

1 Like