Cannot set fieldGroup attribute to link

Hi,

When I try to set to link a fieldGroup attribute I have this error:
image

image

<hbox spacing="true"
      width="100%">
    <button caption="Set link URL"
            invoke="setUrl"/>
</hbox>
 public void setUrl() {
    String value = crmTokenField.getValue();
    if (value == null)
        return;
    if (!value.startsWith("http://"))
        value = "http://" + value;

    crmTokentwoField.setCaption(value);
    crmTokentwoField.setValue(value);
//
//       link.setCaption(value);
//       link.setUrl(value);
}

What is wrong?
Link option is used only when I leverage an attribute as pickerField?
Then how can I save in database a link?

If I set an id it’s working.

Hello @neutrino

Please share a stacktrace that can be found in a dialog if you click the Details button.

Link option is used only when I leverage an attribute as pickerField?

Could you clarify what option are you talking about?

Then how can I save in database a link?

You can save a link as an attribute value of some entity.

If I set an id it’s working.

Could you describe it in more details, please?

Regards,
Daniil