8.15.15 - dropdown show the temp ID for a new record

  • 1
  • Problem
  • Updated 2 years ago
  • Solved
After the upgrade, a picklist field now has the temp record ID like 3 in the dropdown. We are using javascript to dynamically populate the picklist values. Which areas would cause this issue? Can you point us in the right direction?
Photo of jili@heidrick.com

jili@heidrick.com

  • 2,032 Points 2k badge 2x thumb

Posted 2 years ago

  • 1
Photo of jili@heidrick.com

jili@heidrick.com

  • 2,032 Points 2k badge 2x thumb
I verified that the JS code is only adding the picklist once. Skuid is adding the temp record ID to the picklist automatically. Is this a known issue?
Photo of jili@heidrick.com

jili@heidrick.com

  • 2,032 Points 2k badge 2x thumb

When there should only be one picklist value:

console.log('picklist ' + field.metadata.picklistEntries.length);   // this prints out 1 correctly

field.element.empty();

skuid.ui.fieldRenderers.PICKLIST[field.mode]( field, selectedCodeId );


When there should only be 0 picklist value:

console.log('picklist ' + field.metadata.picklistEntries.length);   // this prints out 0 correctly

field.element.empty();

skuid.ui.fieldRenderers.PICKLIST[field.mode]( field, selectedCodeId );


So the issue appears from the skuid.ui.fieldRenderers.PICKLIST, which always adds the extra temp record Id!



Photo of jili@heidrick.com

jili@heidrick.com

  • 2,032 Points 2k badge 2x thumb
This is now fixed by checking if the picklist value being added is available in the meta data. Thanks.