error with snippet property "metadata.displaytype" after deploying to Lightning

  • 1
  • Question
  • Updated 2 years ago
  • In Progress
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:

//snippet to remove the parenthetical/converted value from a currency field
var field = arguments[0],
    value = arguments[1],
    metadata = field.metadata,
    curr = field.row.BuyCurrency__c;
    dt = metadata.displaytype; 
    $ = skuid.$;
if (field.mode !== 'edit' && value !== null) {
    field.metadata.displaytype = 'TEXT';
    var textvalue = value.toLocaleString('en', {style: 'currency', currency: curr});
    value = textvalue;
} else if (value === null) {
    field.mode = 'edit';

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?
Photo of Greg Jarrett

Greg Jarrett

  • 3,526 Points 3k badge 2x thumb

Posted 2 years ago

  • 1
Photo of Christine Jessen

Christine Jessen, Alum

  • 690 Points 500 badge 2x thumb
Greg -

I just tested this out and I am able to access this property in Lightning -

What Skuid version are you on?  

Did you generate a support file for this page?

Photo of Greg Jarrett

Greg Jarrett

  • 3,526 Points 3k badge 2x thumb
The problem seems to be intermittent and hasn't shown up for a week now. We are on Millau 11.0.1. I have re-generated the page support files and it seems to be working fine now.