Page include not working with Brooklyn upgrade

  • 3
  • Problem
  • Updated 2 years ago
  • Solved
The page doesn't load since updating when using id={{$Model.Leads.data.0.Id}} as a query string.

Any ideas of how to correct this?
Photo of Chris Mollan

Chris Mollan

  • 570 Points 500 badge 2x thumb

Posted 2 years ago

  • 3
Photo of Zach McElrath

Zach McElrath, Employee

  • 48,984 Points 20k badge 2x thumb
Looks like a bug, but try using triple brackets: {{{$Model.Leads.data.0.Id}}}
Photo of Chris Mollan

Chris Mollan

  • 570 Points 500 badge 2x thumb
No, that doesn't work.  Do you know if there will be a fix for this shortly?
Photo of Avinash

Avinash

  • 62 Points
Hi Team,

I am facing this issue after upgrading my skuid package to Iteration 3.


Thanks,
Avinash
Photo of Sneha

Sneha

  • 624 Points 500 badge 2x thumb
I am facing the same issue even using 9.3.3
Photo of James Simone

James Simone

  • 102 Points 100 badge 2x thumb
Our sandboxes were upgraded this morning without us doing anything and we are now experiencing the same issue on 9.3.3
Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,210 Points 5k badge 2x thumb
Hi Skuid Community~

This may have been fixed in Brooklyn Iteration 4 by [SKUID-2866] which is now available from the Skuid Releases page. Can you try upgrading and see if it fixes the issue or not? 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.

Please let us know if upgrading does not fix the problem and we will investigate further ... 

Thanks!
Karen
Photo of Amit Agarwal

Amit Agarwal

  • 80 Points 75 badge 2x thumb
Hi Karen,
I don't think the issue is still addressed. I have upgraded to 9.3.4 and the issue still exists for me.  Need quick resolution to this.

Best Regards,
Amit !
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
Can you give a method for us to be able to recreate the problem?
Photo of James Simone

James Simone

  • 102 Points 100 badge 2x thumb
Hey Stephen, sorry the formatting is going to be destroyed but I have pasted the snippet below.  This runs without issue after the page has loaded.

<jsitem location="inline" name="renderAsReadOnly" cachelocation="false" url="">var $ = skuid.$;
$(function() {
    var opportunity = skuid.model.getModel('Opportunity').getFirstRow(),
        isClosed = opportunity.IsClosed;
        
    var renderFieldEditor = function() {
    var pageTitle = $('#pageTitle');
        var editor = pageTitle.data('object').editor;
   
    var fieldEditor = $('.nx-basicfieldeditor').data('object');
    if(isClosed === true) {
    renderAsReadOnly(fieldEditor);
            displayMessage(editor, 'This opportunity has been closed', '');
    }
    };
    
    var renderAsReadOnly = function(fieldEditor) {
        fieldEditor.mode = 'readonly'; 
    fieldEditor.list.render({doNotCache:true});
    }
    
    var displayMessage = function(editor, message, severity) {
        editor.handleMessages(
           [
               {
                  message: message
                  ,severity: severity.toUpperCase()
               }
           ]
        );
        
        $(".nx-messages *").off("click");
        $(".nx-messages *").css("cursor", "default");
    }
    
    renderFieldEditor();
});</jsitem>
Photo of Zach McElrath

Zach McElrath, Employee

  • 48,984 Points 20k badge 2x thumb
Replace this line:

$(function() {

with this:

$(".nx-page").one("pageload", function() {
Photo of James Simone

James Simone

  • 102 Points 100 badge 2x thumb
Hey Zach, that worked for the above example.  One other snippet we use in many places which also breaks on quite a few pages - : 

skuid.snippet.registerSnippet('showVIPAlerts',function(field,value) {  var $ = skuid.$;

  var noteModel = skuid.model.getModel('Notes');

  var renderFieldEditor = function() {
    var pageTitle = $('#notesTitle');
    var editor = pageTitle.data('object').editor;

    if(noteModel.data.length > 0) {
      editor.clearMessages();
      for(var i = 0; i < noteModel.data.length; i++) {
        var row = noteModel.data[i],
        parentType = '',
        createdDateFormatted = skuid.time.makeFormattedDate(row.CreatedDate);
        switch(row.Parent.Type) {
          case 'CustomObject__c':
          parentType = 'Custom Object';
          break;
          case 'OtherCustomObject__c':
          parentType = 'Other Custom Object';
          break;
          default:
          parentType = row.Parent.Type;
        }
        parentTypeInfo = ' (' + parentType + ': ' + row.Parent.Name + ')';
        displayMessage(editor, createdDateFormatted + ' ' + row.Body + parentTypeInfo + ' - ' + row.CreatedBy.Name, 'warning');
      }
    }
  };

  function displayMessage(editor, message, severity) {
    editor.handleMessages([{
      message: message,
      severity: severity.toUpperCase()
     }]);

    $(".nx-warning").off("click");
    $(".nx-warning").css("cursor", "default");
  }

  renderFieldEditor();
});
Photo of James Simone

James Simone

  • 102 Points 100 badge 2x thumb
Any further update on this?
Photo of Amy Dewaal

Amy Dewaal, Official Rep

  • 8,200 Points 5k badge 2x thumb
James, 

Are you still on 9.3.3? Have you tried updating to 9.3.4? 

Sorry this is still an issue for you!
Amy
Photo of James Simone

James Simone

  • 102 Points 100 badge 2x thumb
Hi Amy,

Yes, we have updated two of our sandboxes to 9.3.4 and are still having this issue.  I will continue to look at options on our end since we cannot upgrade our production instance until we have a workaround.