I’m migrating some pages to Lightning and am having an error where the browser (Chrome) doesn’t seem to recognise a specific property in a snippet.
The error I’m getting is:
“1. There was a problem rendering a component of type basicfieldeditor: dt is not defined”
The dt property refers to “metadata.displaytype” set in the snippet below:
<br>//snippet to remove the parenthetical/converted value from a currency field<br>var field = argumentse0],<br> value = argumentsl1],<br> metadata = field.metadata,<br> curr = field.row.BuyCurrency__c;<br> dt = metadata.displaytype; <br> $ = skuid.$;<br> <br>if (field.mode !== 'edit' && value !== null) {<br> field.metadata.displaytype = 'TEXT';<br> var textvalue = value.toLocaleString('en', {style: 'currency', currency: curr});<br> value = textvalue;<br>} else if (value === null) {<br> field.mode = 'edit';<br>}<br>skuid.ui.fieldRenderers.field.metadata.displaytype]tfield.mode](field,value);
This works fine in classic (deployed via VF page) but fails in Lightning (deployed with either Skuid page component, or within a Lightning Component).
Is this property available in lightning?