Hi,
We have created a custom view / dashlet which is loaded on the side of our create view to perform checks and give suggestions when creating a record of a custom module.
In this dashlet I want to add a relate field so I can adjust my logic based on the selected account.
In my hbs file I now have an input field:
<input type="text" name="account-id" data-action="lookup-on-change" autocomplete="off">
But this is a simple input text field and users have to copy / paste an id into the field.
Is it possible to use a standard relate field component in my custom component?
Something like:
<sugar-relate type="account" on-change="xyz">
Or maybe from the javascript side, something like:
app.view.createView({
context: this.context,
type: 'relate',
module: this.module,
layout: this,
model: model,
nopreview: true // hide preview button
});
Any help or links to documentation would be appreciated.