Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following attributes are applicable:

AttributeTypeMandatoryDescription
isUserScriptsBooleanN
This attribute allows enabling
Disable client scripts execution. The default value is 'true'.
isPortalBooleanN
This attribute allows declaring that this widget should be displayed
Set the attribute to 'true' to display the widget on the portal.
modelIdStringN
This attribute allows specifying
Specify RE model ID.
recordIdStringN
This attribute allows specifying
Specify an ID of an existing record to extend.
styleStringN
This attribute specifies

Specify the display settings (size, font, color, etc.) of the widget elements using the CSS syntax.

tableNameStringY
This attribute allows specifying a

Specify the name of the table containing the extending record.


Code Block
languagejs
themeEclipse
titlerem
linenumberstrue
<rem modelId="{data.model_id}" tableName="{data.table_name}" recordId ="{data.record_id}" />


Code Block
languagejs
linenumberstrue
( () => {
    	window.s_widget_custom = window.s_widget_custom || {};
    	const modelIdparameter = new URLSearchParams(window.location.search).get('model_id'); // Getting model id from URL
    //Setting model from model_id URL parameter so new record knows from which model to add attributes
    
	s_widget.setFieldValue('model_id', modelIdparameter);
    // Setting table name and record ID of existing record in order to find a model
    	s_widget.setFieldValue('table_name', window.s_form.getTableName());
    	s_widget.setFieldValue('record_id', window.s_form.getUniqueValue());
})();

...