SDK Issues - UI Sections and Notifications #41
Replies: 2 comments 1 reply
-
|
For the HTML field, have you tried using an include instead of having the content directly in the fluent? (Now.include) and then keeping that in an html file? Just wondering if the escape/characters would be processed properly? (Still a problem of course, just wondering about a work around) |
Beta Was this translation helpful? Give feedback.
-
|
Forms are a problematic type due to sys_ui_sections as you have found out, the instance installer handles them in a special way that conflicts with using the Record API here. The official |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey team, I have noticed a couple issues when using the SDK to build and deploy scoped applications, related to UI sections and notification records:
Notifications
I noticed when notifications are deployed through the SDK, any none breaking space characters become visible in the html.
For example here is the html field of a notification created on the instance:
And here is the corresponding now.ts file created after running a transform:
If I now build the application and deploy it via the SDK, this is what the HTML field now looks like on the notification:
If you view the source HTML now, you can see the "&" in the nbsp character from the notification has been replaced with "&" despite the fact it does not appear that way in the now.ts file
I expect the SDK is transforming it during the build process but it then has the affect of appearing in the actual email. For now I have a workaround for this by having a post build script that strips any instances of "amp;" out of notification records and sets them back to "&".
But this affectively makes it very impractical to use the SDK with any application that contains notifications
UI Sections:
Whenever I make a change to a form layout on the instance and run a transform, the SDK appears to append the changes onto the end of the corresponding sys_ui_section now.ts file instead of replacing it. This means the next time you build and deploy the application via the SDK, you can end up with duplicate fields in that UI section.
Here for example is a simple form layout:
And the corresponding now.ts files code
If I now go onto the instance and make a change to the layout, say for example swap the title and order field, then run a transform, this is now the code in the same now.ts file:
As you can see it is now about twice the length due to the new layout from the instance essentially being appended onto the end of the file. If you now build and deploy the application, and visit that same form, it looks like this:
To work around this currently I need to make sure I first delete any sys_ui_section now.ts file I modify on the instance before running a transform, which is not ideal.
Beta Was this translation helpful? Give feedback.
All reactions