Dependent Picklists not working in 9.5

  • 1
  • Problem
  • Updated 2 years ago
  • Solved
We upgraded to 9.5 today and noticed afterwards that our Dependent Picklists are no longer working on Skuid pages. I have 9.3.4 in a sandbox and the page is still working correctly there. 

Any changes that could have caused this? Any suggestions? 
Photo of Adam Johnson

Adam Johnson

  • 1,000 Points 1k badge 2x thumb

Posted 2 years ago

  • 1
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 11,050 Points 10k badge 2x thumb
Hi Adam,

We have been able to reproduce the problem you are experiencing and have notified the developers of this issue. We will update this post when a future release addressing this bug is available. Thanks for alerting us of this bug and helping make Skuid better!

Mark
Photo of Tyler Neal

Tyler Neal

  • 760 Points 500 badge 2x thumb
Hoping for a quick fix, cannot update because dependent picklists are essential to our org.
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 11,050 Points 10k badge 2x thumb
Adam and Tyler,

Our team has created the following workaround for this issue. The fix will also be rolled into an upcoming Skuid update. In the meantime, please give this a try and let us know what you find.

This overrides the Skuid Field constructor to address SKUID-3027. It is a workaround targetedat Skuid Brooklyn Update 1 (9.5), and it is not intended to be used with any other version of Skuid. It is provided as is, without support, and should be removed once a version of Skuid containing a fix has been installed.

To implement this workaround, add this code to a Static Resource and include that resourceas a JavaScript Resource on any page affected. 

/** * This overrides the Skuid Field constructor to address SKUID-3027. It is a workaround targeted
 * at Skuid Brooklyn Update 1 (9.5), and it is not intended to be used with any other 
 * version of Skuid. It is provided as is, without support, and should be removed once a version 
 * of Skuid containing a fix has been installed.
 * 
 * To implement this workaround, add this code to a Static Resource and include that resource
 * as a JavaScript Resource on any page affected.
**/
(function(skuid){
var s=skuid.$,v=skuid.utils,A='DATETIME';
function g(a,b,c,d){var e,f,g=this;if(g._GUID=v.generateGUID(),g.row=a,g.model=b,g.editor=c,g.options=d||{},g.subComponents=[],g.id=d.fieldId,g.name=d.fieldName,g.context=d.fieldContext,g.messages=[],g.id&&(g.metadata=g.model.getField(g.name?g.name:g.id,g.context)),e=g.metadata,g.options.labelText?g.label=g.options.labelText:g.options.label?g.label=g.options.label:e&&(g.label=e.label),g.options.required||e&&e.required?g.required=!0:g.required=!1,g.mode=d.mode||"read",g.element=s("<div>").addClass("nx-field").attr("data-uid",g._GUID),d.additionalClass&&g.element.addClass(d.additionalClass),g.element.data("object",g),g.editable=(!e||b.isRowNew(a)&&e.createable||e.editable)&&g.options.editable!==!1&&"readonly"!==g.mode,g.loading=d.loading,g.options.register&&g.model.registerField(g),f=d.controllingFields,e&&s.inArray(e.displaytype,["PICKLIST","MULTIPICKLIST","COMBOBOX"])!==-1){var h=e.controllingField,i=g.model.getField("RecordTypeId");f||(d.controllingFields=f=[]),i&&f.push(i.id),h&&f.push(h)}f&&f.length&&s.each(f,function(){var a=this;a.indexOf(".")!==-1&&(a=a.split(".")[0]),g.model.registerField(g,a)}),e&&e.displaytype===A&&g.subscribeToEvent("ui.timeZoneChanged",function(){g.render()})};s.extend(g.prototype,skuid.ui.Field.prototype);skuid.ui.Field = g;
})(skuid);
Photo of Rupali G

Rupali G

  • 378 Points 250 badge 2x thumb
Worked like a charm! Thank you for providing a quick fix. 
(Edited)
Photo of Adam Johnson

Adam Johnson

  • 1,000 Points 1k badge 2x thumb
This worked perfectly! Thanks to you and the team for jumping on this so quickly!
Photo of Kaede Holland

Kaede Holland

  • 2,744 Points 2k badge 2x thumb
I must not be doing something right. Should the static resource be a txt file? I added it to my page and the dependent picklist is still not working :(
Photo of Adam Johnson

Adam Johnson

  • 1,000 Points 1k badge 2x thumb
I saved the code from Mark in notepad as a txt file, including his commented out notes, and uploaded it as a Static Resource in Salesforce (it will work as a public or private file).

I then created a Javascript item on the Skuid page set to Static Resource and chose the txt file from the static resource lookup.

Are you on Skuid version 9.5?
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
Hi Skuid Community~

Thank you for your patience as we addressed this bug. This issue has been resolved in the
Brooklyn Update 1 - Iteration 1 which is now available from the Skuid Releases page.

As a reminder, Salesforce does NOT allow reverting back to prior versions of managed packages. Skuid always recommends installing new versions in a non-business critical sandbox environment to test all mission critical functionality before installing into a production environment. We also recommend that you update out of date themes when you upgrade.

Thanks!