Skip to main content

Defect/Issue Description:
A description of the bug I wrote a formula that is leveraged as the Event Template for a page with a calendar component. In the preview, the data renders as expected, but in production, more than half the formula fails to display. Everything after the ‘
’ tag is dropped by the page in production. Interesting, I have another page that is leveraging almost the same formula, and I have no problems with the syntax or rendering on that page.


Environment:


  • API Version: (v1 or v2)

  • Release: (Chicago, Boston, etc) Edinburgh

  • Release version: (Version Number) 16.0.8

  • Platform: (Managed cloud or Salesforce) Salesforce

Brief Summary of the Defect/Issue: My previewed page does not match the production page - same formula obviously.


An easy-to-understand description of the bug (e.g., “When mass selecting items (not including clicking the ‘select all’ checkbox), other checkboxes on the rows selected appear to take on a checked value.”). I have a complex formula that renders as expected in preview, but shows differently in production.


Action Performed:
The action that resulted in the bug Moving from preview to production.


Expected Result:
How the page should have performed Matching results


Actual Result: Different results
How the page actually performed


Additional Resources:
Please add any screenshots, videos, XML file(s) to help us reproduce the defect/ issue. See how to create a good test page]


Side by Side of pages with different results from the same formula:


Formula that renders correctly in preview and production on A DIFFERENT PAGE:


This page’s formula that DOES NOT work:

Hi @CRMF_Woj, here’s my understanding of the issue, correct me if I’m wrong.


  1. You have one complex formula that’s working in both preview and production.

  2. You have a similar complex formula that’s working in preview, but not in production.

Correct?


Questions and Thoughts



  • By preview and production, do you mean different Salesforce orgs? Or the page preview vs. when it’s deployed in Lightning? If Lightning, I’m wondering if it’s a styling difference or something that’s cutting off the bottom of the formula.




  • For testing purposes, try having that formula field displayed in the modal that appears when you click on the event. That way you can see if the formula is really only bringing in half of what you expect, or if the formula is working but it’s getting cut off because of size limitations.




  • Make sure the formula return type is the same on both pages.




  • Go ahead and put both formulas in a diff checker like https://www.diffchecker.com/ - it will flag all the different field names, but it may be an easier way to check and make sure the syntax is identical and non-identical formulas.




  • Something that helps me when I’m troubleshooting complex formulas is to break it into pieces and test each peace in a separate formula field before putting it together. Also double check that all the fields are included in the model. You can also experiment using {{{triple brackets}}} to get the unformatted field values.




Hey Anna!


Thanks for the response!


The understanding is slightly off. There are two formulas, but they are in the same environment. My confusion really lies just with the one formula - which is a single formula, in a single environment that shows different results depending on where it is viewed. When I say ‘Preview’ vs ‘Production’, I’m talking about previewing the Skuid page from the builder versus viewing that page embedded in the Salesforce org.


So it’s literally the same formula on the same Skuid page in a single environment that shows a different result when previewing the page from the builder than when on the actual Salesforce page.


This is what has lead to my confusion - it’s the same thing but showing different results depending on where you view it (skuid page preview vs. in the salesforce org).


The second formula I’m showing is along the same lines, but a slightly different formula. I am showing it because it’s also complex, but the behavior is as expected, and it shows consistent results between the preview and when

viewed in production.


So ultimately my question really is - why does a single formula show correctly in the Skuid page builder preview, but then shows a different results when viewed in the Salesforce Org.


Thanks and regards,


Chris


A little more information…


I did double check that both formula have the same attributes (display type, etc). I’ve also added that same formula field to the modal pop-up, and it renders the full formula.


Calendar Entry with abbreviated text:


Modal showing formula rendering as expected:
image


Same calendar event and formula in the page builder preview, with the second line of text visible (even though it gets cut off slightly):
image


Thanks, @CRMF_Woj, that extra context is helpful. It does seem like it might just be a styling difference in Lightning.


  1. Here’s another thing you can try - when you preview the Skuid page, change the URL from /apex/skuid__ui?page=PageName to /skuid/ui.app?page=PageName. This will allow you to preview your page in a Lightning component and you can see if the issue is happening there or not. It’s not a substitute for real Lightning, but another way to test the page and get more information about when the issue is occurring.

  2. Have you played around with making the event template size bigger? This is something you could look into. I’m not sure off the top of my head if there’s a way to do this, but will check with the team.

  3. To be able to pin this down as a potential product issue, we need to be able to reproduce the issue in one of our environments. Can you paste the formula as text in a reply?

  4. If you have time to create a test page with standard/Skuid objects, it’ll help us diagnose the issue faster.

Thanks for your patience, hope we can figure it out soon.


Hey Anna!


Thanks for the suggestions!



  1. I tried this and the issue occurred when I updated the URL - just like in production.




  2. I have not looked into making the event template size bigger but will play around with it - let me know if you hear back from your team on this.




  3. Formula:



IF({{WhatId}}=NULL,{{AWBC_Subject_Text_Area__c}},
{{Account.Name}} +" ("+ {{Account.AWBC_Party__c}}+") "+" - "+{{Account.AWBC_District__c}}
+" "+IF({{AWBC_Staff_in_Attendance__c}}=NULL,"",{{AWBC_Staff_in_Attendance__c}})
+" <br> "+IF({{Location}}=NULL,"",{{Location}})+" <br> "
+IF({{AWBC_Attendee_Names__c}}=NULL,"",
{{AWBC_Attendee_Names__c}}))

  1. I’d love to, but I don’t know I fully understand the ask. Is this substituting my custom fields for standard ones of the same type? The overall page is based on Salesforce Events, so we should be standard there.

Best


Chris


Thanks Chris, yes if you could (1) clone your page, (2) remove any other components besides the calendar, and (3) substitute standard fields for your custom ones, that would be perfect.


Actually, I had a moment to look at this this morning. I created simple calendar page that just has a long template and was able to confirm the spacing is different between Visualforce and Lightning … looks like the <br> is bigger in Lightning.


For now, is it an option to reduce the font size for the event template? In the Design System, Calendar > Event, you can change the font size and weights for the template text, title, and time.


I’ve reported this to our product team as a product issue.



<skuid__page unsavedchangeswarning="yes" personalizationmode="server" showsidebar="false" showheader="false" theme="Ink">
<models>
<model id="Events" limit="20" query="true" createrowifnonefound="false" datasource="salesforce" sobject="Event">
<fields>
<field id="StartDateTime"/>
<field id="EndDateTime"/>
<field id="Subject"/>
<field id="Description"/>
<field id="Location"/>
</fields>
<conditions/>
<actions/>
</model>
</models>
<components>
<skuid__calendar uniqueid="sk-1twh-13979">
<eventSources>
<eventSource model="Events" eventTitleField="Subject" startField="StartDateTime" endField="EndDateTime" eventTemplate="&lt;b&gt;Event&lt;/b&gt;&lt;br&gt;&#10;Lorem&lt;br&gt;&#10;Ipsum" allowHTML="true">
<onClickEventActions interaction="onClickEventActions">
<action type="showEventDetails"/>
</onClickEventActions>
<onCreateActions interaction="onClickEventActions">
<action type="showCreateEvent"/>
</onCreateActions>
<afterChangeActions interaction="onClickEventActions">
<action type="showToast" duration="4" position="bl" message="Saving..."/>
<action type="save" autogenerated="true">
<models>
<model autogenerated="true">Events</model>
</models>
<onerroractions>
<action type="blockUI" message="There was an error" timeout="3000"/>
</onerroractions>
</action>
<action type="showToast" duration="4" position="bl" message="Saved"/>
</afterChangeActions>
</eventSource>
</eventSources>
<views>
<view type="timeGridWeek"/>
</views>
</skuid__calendar>
</components>
<resources>
<labels/>
<javascript/>
<actionsequences/>
</resources>
<background/>
<interactions/>
<surfaces/>
</skuid__page>

Hey Anna!


Thanks for passing it along to the product team, and checking into the issue to confirm what was going on. I’ve reduced the text size for now and it definitely helps. I also now fully understand the issue and just being able to talk to it has gone a long way.


Thanks so much for the help and solution!


Reply