- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
UI Builder Essentials Part 9
Table of Contents
- Equip yourself with the best tools
- Finding where an issue is occurring
- Fixing styling issues
- Fixing Cross-Component or Component to Data Resource interactions (Events)
- Use NED tools to observe what events are fired
- Check the event configuration in UI Builder
- Check the event mappings and configuration of data resources/controllers
- Check for event mappings that are invalid or missing
- Fixing a Component Not Interacting Within Itself Correctly
- Fixing a Data Resource or Controller not working
Overview
Xanadu
Troubleshooting
If at any point something isn't working, try clearing the UI Builder cache.
Within your page variant editor in UI builder, click the hamburger menu icon at the top-left, go to Developer > Clear UI Builder Cache. You can also try clearing your local browser cache.
Equip yourself with the best tools
Finding where an issue is occurring
- Is the problem related to styling? In other words, is it a problem with width, background-color, padding, etc.?
- Is the problem related to a component not interacting with another component or a data resource correctly?
- Is the problem related to a component not interacting inside of itself correctly?
- Is the problem within a data resource or a controller not working like you expect? Is it not fetching or not updating something?
Fixing styling issues
- Open your page as your end user would see it, impersonating the user should not be required but it might be a good thing to try.
- Inspect the part of the page that is not working as expected using your browser's developer tools. (Here is a small guide on using your browser tools found in our Knowledge 2024 Theming lab.)
- Check the styles on the component in question and any Containers above it.
- You can make changes to the styles directly through your developer tools to check and see what might be causing or might fix the problem.
- Note: you cannot change styles on the DIV inside of the
now-uxf-page-simple-container
component due to a framework limitation.
- Note: you cannot change styles on the DIV inside of the
- Once you have found a potential culprit or place that additional styles are needed, now you can right click on the component and use the NED tools to open the page in UI Builder.
- Next, locate the component or it's container in the left-side Content Tree panel and click on it.
- Now, on the right side Component Configuration panel, select the Styles tab and change around the style that you think could be causing the issue.
- Note: for containers, there are both Internal and External styles and the fix might be needed in one or both of those places. You can access these using the Edit CSS button at the bottom of the style panel.
As you make changes you should be able to see them reflected on the Stage in the middle of UI Builder or you can save and repeat steps 1-4 to see if it fixed the issue.
Fixing Cross-Component or Component to Data Resource interactions (Events)
Use NED tools to observe what events are fired
- While viewing your page as an end user would view it, open the NED Tools via your browser's developer tools and switch to the Events tab.
- So you don't have to scroll through a bunch of events, clear out the console using the trash icon.
- Perform the action that is not working as expected.
- Check to see if the event fired and if it had the appropriate payload fields that you expected.
Check the event configuration in UI Builder
- Go to the component that the user is acting on (e.g. button, form, etc.)
- Inside of UI Builder, check the event mappings in the right side Component Configuration panel, within the Events tab, and open the one that coincides with the action the user would be taking.
- Make sure that properties for that event are filled in as expected.
- You can wrap the
DEBUG
formula around a data-bound output inside of Formula builder for the property OR you can switch to script mode and do aconsole.log()
to log whatever you are receiving from the event and what you are putting into the payload. Either of these options will appear in the Console tab of your developer tools if you perform the action that triggers this event as an end user would.
- Often the
event.payload
that you are expecting is incorrect or has different properties than what you are using, so be sure to check that! - Sometimes deleting the event mapping and re-adding it can fix issues that are harder to see by starting over.
Check the event mappings and configuration of data resources/controllers
- Open the data resource that a component needs to interact with.
- Make sure that its input values are setup correctly.
- Check any event mappings that the data resource has and ensure that it is working as expected using the steps in the event configuration check above.
- Most often, the outputs of the data resource aren't coming as expected or the result of an action (e.g. Update Record) returns properties that you might not expect.
Check for event mappings that are invalid or missing
If you check the component or data resource that you are investigating, you might see an error. This could mean:
- The event is missing because a plugin is not installed (e.g. CSM/FSM Workspace has many additional plugins).
- The event is missing because a
sys_ux_event
record was not captured with changes made to the page and might be in a different instance and can be brought over. - The event is misconfigured and broken and should be removed.
Typically, if you see this error on an event mapping that was provided OOB, it is likely a missing plugin and can be left alone. If you see an error and this event mapping has been modified or is not OOB, check another environment to see if the event mapping looks correct there and port over the missing sys_ux_event
.
If neither of the above apply, try removing this event and seeing if it fixes the issue you are experiencing, then re-add it and try again. When in doubt... Clear your cache!
Fixing a Component Not Interacting Within Itself Correctly
- Open the page in UI Builder where the component is located.
- Find the component in the left-side Content tree and click on it.
- Note the ID of the element at the top of the right side Component Configuration panel.
- Open the page as the end user would see it.
- Open your browser developer tools and open the Next Experience Tools Inspector tab.
- Switch to the Components tab inside of the NED tools and search for the element with the ID you noted.
- Once you've selected that element on the left, you'll see it's properties and state on the right.
- This information will tell you what your configurations in UI Builder are providing to that component as inputs and how that component is managing it's state internally.
- If you are not seeing the Property value you expect from your configuration, then go to the component in UI Builder and try changing the value or binding you are passing into the property.
- If you don't see a property that you can configure for what you are trying to do, then you can reach out through Support to see what options there might be for future enhancements.
Fixing a Data Resource or Controller not working
Data resource preview only shows an error message
- Some data resource types (TRANSFORM and COMPOSITE) require an ACL to be created to allow them to be executed and that is why the error is showing.
- To correct, open the data resource in the platform view (you can use "Open Record" from the context menu on the data resource in UI Builder) and grab the
sys_id
of the data resource record. - Go to the
sys_security_acl
table and create a new ACL. - Set the type to be
data_broker
and add a role or condition set of who should be allowed to execute the data resource. - Set the Name field to anything and save.
- Open the list view of the
sys_security_acl
table, double-click on the name of the ACL you just created, and paste in thesys_id
of the data resource. - Return to UI builder, refresh the page, and the data resource should be available.
Data resource preview shows an "unconfigured" message
Some data resources require a minimum set of Input Properties to be populated before they will execute. Fill in the Input Properties for the data resource and the preview will update when the required properties have been set.
In some older versions of UI Builder, the above problem can trigger this message as well, so try the steps above if setting Input Properties does not fix it.
Data resource is not fetching expected values
- Check and make sure the input properties are set correctly.
- If they are bindings, double check the previewed value in the Input Property field (the text that shows) to make sure the binding is bringing in the value you expect. You can also bind the value to a Heading component on the stage to see a bigger preview of the value. (Remember to remove any extra components you may have added to the page during troubleshooting before promoting your work to prod!)
- If you own the data resource, use the Open Record in the context menu to check the resource on the platform and ensure that it is configured as you expect.
Data resource has no input properties or isn't creating/updating/deleting correctly
For Mutative data resources, there usually are not input properties, and instead the behavior of the resource is set through event mappings.
- Find the component or data resource that should call the mutative data resource and create an event mapping to the EXECUTE event of the mutative data resource.
- In the Payload of the event, you provide a version of Input Properties for the data resource so it knows what to do (You might call that same resource differently from different components or resources!)
- If that event mapping isn't working, make sure that the Payload fields are set correctly and are getting the values you expect.
- You can use the
DEBUG
formula for a binding or the Script option toconsole.log()
out what you are passing in to make sure that it is correct. - On the mutative data resource in your page, you can add an event mapping for "Operation Failed" to get more information about why the data resource could not execute successfully.
Conclusion
Congratulations! 🎉 In this article, we've explored essential tips and tricks for troubleshooting and optimizing your UI Builder projects within the Next Experience Framework. You'll learn how to leverage NED tools for performance tracking and understand event configurations to ensure seamless component interactions.
If you found this guide helpful, consider sharing it with peers or teams looking to elevate their UI Builder skills with dynamic pages. If you like this type of content, please mark the article "Helpful", and leave us your topic ideas in the comments.
Keep an eye out for future tutorials where we’ll dive deeper into crafting immersive, data-driven experiences. Until then—happy designing, and stay curious!
Check out the Next Experience Center of Excellence for more resources
- 5,921 Views
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.