Skuidify New Notes or show native New Note page in a popup

I have been struggling with this for more than a day now and would really help if anybody from the community could help me out with this. 


We are trying to keep our users within skuid as much as possible so we are in a process of skuidifying whatever we can… one of which was the new notes object. We had the old notes already skuidified, so I assumed this would be an easy process… except it involved building models for all these objects - ContentNote, ContentDocument, ContentVersion, ContentDocumentLink and I wasn’t very happy with the end result. One of the biggest reasons being that the users get the richtext experience with native salesforce and I wasn’t able to do that using skuid.

So I instead thought of displaying the native salesforce page for notes in a popup using an iframe, but I got the error that it cannot be done “in a frame because it set ‘X-Frame-Options’ to ‘sameorigin’”. I remember having dealt with this issue with chatter and I was able to fix that using the skuid__social visualforce page. Is there anything similar available to create a new note?

Also any thoughts on the first approach i.e. skuidifying new notes?

Ashwat,

It looks like the Content for the note is Base64 encoded (see here - https://salesforce.stackexchange.com/questions/138361/inserting-a-content-note).

I think you could add a rich text field to another object (like a Contact), create an model on Contact to allow display and editing of the note, then send the content of the rich text field and the id of the related object into an invocable class that creates the ContentNote and ContentDocumentLink.  You’ll need a second class to reverse the process for editing.

Alternatively, you may be able to handle the encoding and decoding in JavaScript.  This might be better done as a custom component.

Here is a link to the post on pulling in the chatter feed to a skuid page - https://community.skuid.com/t/why-doesnt-the-chatter-feed-refresh-when-the-model-reloads

Thanks,

Bill


Hi Bill,

I don’t have an issue displaying chatter on my page… its the new note page that I would like to display within a popup/page include using an iframe but due to clickjack protection settings I cannot display a native salesforce page in an iframe. I was wondering if there was a visualforce page similar to social (which can be used to display the chatter) within the skuid managed package for the new notes.




Ashwat,

I don’t know if there is an equivalent to the ‘social’ page for the new rich text notes page.

One other option is to just replace Notes with your own custom object.  Then you could stay declarative on your Skuid pages.

Thanks,

Bill