Hello all,
I have a table “deals” and a table “contacts”. Deals table contains field “contact” linked to the “contacts” table.
When I open a record in the contacts table and I see the list of deals (deals:contacts is many:one) and I want do add a new deal from there (via the standard “+” button), is there a way to copy data from some of the fields of the contacts record to the fields in the new deal record ?
I know how to do it with a script if I have a button created with workflow automation. But in this particular scenario ?
Denis
Hi,
try to use script parentModel over table ‘deals’. Link to documentation doo.model.modelMetadata - Tabidoo Help Center and an example of use if (doo.model.modelMetadata.parentModel) {
if (doo.model.modelMetadata.parentModel.modelMetadata.currentForm.tableInternalName === ‘kalkulace’ || doo.model.modelMetadata.parentModel.modelMetadata.currentForm.tableInternalName === ‘faktury’) {
doo.model.dispatched.isVisible = false;
doo.model.dispatchedLater.isVisible = false;
} else if (doo.model.modelMetadata.parentModel.modelMetadata.currentForm.tableInternalName === ‘orders’ && doo.model.ver === -1) {
doo.model.dispatched.isVisible = true;
doo.model.dispatchedLater.isVisible = true;
}
};
With Regards,
Filip
Hi Filip,
thanks for the suggestion. I will certianly look into it and try it out.
Sorry I am replying so late, but a colleague of mine (professional coder) solved that problem for me by creating some custom function which I had problem understanding
And I forgot to check here. But thank you very much for your time.
Denis