AnsweredAssumed Answered

How to populate relate field with logic hook, immediately after a new record is created with 'uuid()'?

Question asked by Adam Adam on Nov 17, 2014
Latest reply on Sep 3, 2015 by Sumit Sahay
I have used a before_save logic hook with invoices that runs a query to see if the the name entered into billing_contact exists in the contact menu. If it does then data entered into the form is saved to that contact, if it does not exist then a new contact record is created, this works great!

Except for one thing: once the record is created and the page reloads, the billing_contact relate field is erased and the user has to manually do a quick search for it and select it.

How do I make the logic hook insert the name and ID of the newly created contact into the billing_contact and billing_contact_id fields and then save the form??

Thanks

Outcomes