Skip to main content

Questions tagged [contentnote]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
23 views

Content Note Owner loses access to edit Note after an edit by other user, wanted to retain the edit access for owner

If user A creates & owns the note and later other User B updates the same content note then after the update User A will not be able to edit the same note even though User A is the owner. [This ...
Ravi Roy's user avatar
0 votes
0 answers
54 views

How to preserve rich text formatting in contentNote after escaping HTML characters to prevent XSS attack

I need to insert contentNote record from apex rest api. Below is the sample code ContentNote noteRecord = new ContentNote(); noteRecord.Title = 'Title'; String body = restJSONdata.get(...
Monalisa Das's user avatar
1 vote
1 answer
1k views

I need to convert a String to Blob within a Flow for the VersionData field on a ContentNote/ContentVersion type

I'm trying to insert a File (ContentVersion) or ContentNote with Rich Text within a Flow. But has anyone encountered the need to convert a string to a blob (base64 encoded type) in order to get a ...
rmarq423's user avatar
  • 977
0 votes
1 answer
635 views

How to Query ContentNote in Apex and show it in LWC Component

I am running the below SOQL to query to show 5 to 10 Notes records on in a LWC component based on certain conditions SELECT Id, Title, LatestPublishedVersion.VersionNumber, LatestPublishedVersion....
RedDevil's user avatar
  • 7,841
-1 votes
1 answer
110 views

Variable does not exist: ContentNote

We are trying to create the version of the 2GP managed package in a Scratch Org in Salesforce. But Getting alot of Errors related to 'ContentNote'.kindly Suggest us the solution for this error.
umair's user avatar
  • 1
0 votes
1 answer
325 views

"Notes" related list is missing for PersonEducation object

We enabled notes in setup. Most objects have "Notes" in the related list. However, it is missing for PersonEducation. From the documentation, LinkedEntityId in ContentDocumentLink does ...
flowgician's user avatar
0 votes
1 answer
123 views

ContentNote and DataLoader - permission

I have a question, I wanted to delete old notes from ContentNote object using DataLoader. Part of the notes I was able to delete, but with the rest I got the message ERROR: insufficient access rights ...
Salawa's user avatar
  • 23
0 votes
1 answer
251 views

Clear Blob data from ContentNote Content to use in flow

Very new to Salesforce. I'm trying to put together a little Apex Class to use as an action in a Flow. The Goal is to take the Content from a contentNote and clear the Blob data to then display the ...
dfadams's user avatar
2 votes
1 answer
890 views

Inserting Content Notes as Experience(Community) user in test class fails

Getting an error trying to insert a ContentNote in a test class as a community user: insert new ContentNote(Title = 'Cancellation evidence', Content = Blob.valueOf(body)); ...
Tony White's user avatar
0 votes
1 answer
201 views

JSONDecodeError while accessing Salesforce's ContentNote content using simple-salesforce

I am trying to access the content from the contentnote object. I queried ContentDocumentLink where i passed account id as LinkedEntityId and got the ContentDocumentId. Using ContentDocumentId, I ...
sudeep's user avatar
  • 3
0 votes
1 answer
476 views

'Enable Notes' strange behaviour

When in Notes Settings 'Enable Notes', there are some strange situation. They stop appear like Note records, and i don't know what object they represent now. And, logically, they don't appear in '...
Swan768's user avatar
  • 41
0 votes
0 answers
401 views

Need help with a trigger to update custom field based on new ContentNote

I am having an issue getting this trigger to fire. The requirements are that when a new ContentNote is created on the Opportunity record, I need Opportunity.Last_Note__c to update with the Title of ...
Laura's user avatar
  • 23
2 votes
1 answer
681 views

My test class (not annotated seeAllData=true) actually sees data for ContentNote SObject

I know test methods should not see any data except the data created in test context, but when I run the test below, the query returns an org record. It should not I have a REST class like @...
Emmanuel BRUNO's user avatar
0 votes
2 answers
137 views

What is the most performant way to check if Content Notes is enabled in a org?

Is there a more performant way to dynamically detect if Content Notes is enabled? I see that getGlobalDescribe can be used to check the presence ContentNote, if it present then is enabled. Usually, ...
Jeferson Chaves's user avatar
2 votes
1 answer
318 views

Which Storage Limit does a ContentNote count against?

While we can query a ContentNote with SOQL, it does not appear that ContentNote "records" count against Data Storage the way a proper sObject does. I believe a ContentNote counts towards File Storage ...
krigi's user avatar
  • 2,236
6 votes
0 answers
287 views

How is the IsReadOnly attribute used on ContentNote?

I'm trying to create a read-only "enhanced note" and I see that there is a property on ContentNote for IsReadOnly which would work perfectly for the use case but unfortunately: Line: 1, Column: 17 ...
Mark Pond's user avatar
  • 23k
1 vote
1 answer
377 views

CreatedById Doesnt Work

I am currently developing an external application that uses the Salesforce REST API to consume. The POST method to the endpoints /services/data/v47.0/sobjects/ContentNote&& /services/data/...
CodyB1150's user avatar
2 votes
2 answers
3k views

How do I retrieve and modify AttachedContentNote objects attached to a record?

So I've created a custom object and added the Notes to available related lists on the page layout. Now I want to manage notes through the REST API. The problem is, I have no idea how to access the ...
ProgrammingLlama's user avatar
1 vote
1 answer
324 views

Find all notes which are not related to anything

We imported numerous notes into Salesforce and we were able to connect most of them to their corresponding objects with ContentDocumentLink. However, a few of need to be manually connected. So how can ...
adius's user avatar
  • 159
0 votes
0 answers
330 views

While converting classic notes to Lightning enhanced Content Notes getting UNSAFE_HTML_CONTENT error on versionData field.!

We are migrating from Classic to Lightning, In this process we are converting classic Notes to Lightning supported Note (ContentVersion). We have a batch which does this job, getting below error: ...
RKM's user avatar
  • 517
-2 votes
2 answers
868 views

Trying to prevent deletion of a Note with a before delete trigger. Below code is not working [closed]

Please find the below code: trigger DeleteNote on Note (before delete) { for(Note N : trigger.old){ if(Trigger.isDelete){ N.adderror('Note Cannot be deleted'); } ...
Sneha's user avatar
  • 1
0 votes
1 answer
329 views

Notes. Mass Upload. Hitting some limit and getting "Note can't be saved"

I'm doing data migration and need to upload ~500k Notes. 192k Notes were uploaded and now I'm getting Note can't be saved error via API and Note contains characters that can't be saved when trying to ...
ytiq's user avatar
  • 4,572
0 votes
1 answer
490 views

After adding 500 ContentNote objects to one Account by one user, nobody can add any more ContentNote records

We are developing a ContentNote integration piece. As a System Administrator of a Partner Developer org (note: NOT the usual Dev org, although i don't know if this matters, the PD has higher limits ...
zaitsman's user avatar
  • 1,950
2 votes
3 answers
8k views

How to fetch contentNote records as per the contact record?

I am trying to fetch the note title, note body as per the related contact ID in one SOQL query as two SOQL queries won't serve the purpose. In contentNote, We have the note title and note body but ...
gs650x's user avatar
  • 2,680
2 votes
2 answers
916 views

ContentNote - INVALID_INPUT which characters are invalid

I am trying to use REST API to update the content of ContentNote object. I am submitting base64 encoded content, e.g. this: PHA+cmFiYml0PC9wPjxwPjxicj48L3A+PHA+...
zaitsman's user avatar
  • 1,950
0 votes
0 answers
203 views

Download ContentNotes linked to entities by others

I have an org with SNotes enabled. I am trying to use REST API to query SNotes on Account. If the current user adds an SNOTE, then a simple SOQL query like so returns it: GET /services/data/v42.0/...
zaitsman's user avatar
  • 1,950
1 vote
2 answers
2k views

"Note can't be saved" error on ContentNote insert

I'm trying to create ContentNote records from Note ones but it's always giving me this particular error: FATAL_ERROR System.UnexpectedException: Note can't be saved Code: List<Note> noteLIST ...
molinet's user avatar
  • 925
0 votes
2 answers
1k views

How to export the Data from the ContentNote Object in the Salesforce Professional Edition

I have exported all the data from the Professional edition Salesforce Org. However I have all the data from the available objects, but the data of the Salesforce Internal object 'ContentNote' is ...
Rohan Saraf's user avatar
2 votes
2 answers
282 views

Custom exception on Enhanced Notes

I need to write a trigger on a Enhanced Notes ( which are stored as ContentNote records ). I need to match a certain text in the note body and then show the custom exception on the note component ...
Mohit Arora's user avatar
6 votes
2 answers
139 views

Workaround for the one record at a time trigger invocation when starting from Content Note

I hit this platform problem a while ago Why is this ContentNote trigger receiving 1 record at a time even though multiple records are being inserted?. But today I've hit it again and now I need a ...
Keith C's user avatar
  • 136k
1 vote
2 answers
2k views

Content Notes from CSV not uploading via Data Loader

We are attempting to upload a CSV containing local drive links to text files and html files. We want these to become "Content Notes". Data Loader keeps throwing errors when we attempt to upload (see ...
WrittenInCode's user avatar
4 votes
1 answer
521 views

Why is this ContentNote trigger receiving 1 record at a time even though multiple records are being inserted?

I am seeing a ContentNote trigger called on individual rows even though a bulk insert is done. A stripped down version follows. The debug log output demonstrates that 3 ContentNote objects are ...
Keith C's user avatar
  • 136k
3 votes
0 answers
1k views

Why do I get the error "System.VisualforceException: Read access denied for ContentNote, controller action methods may not execute."?

In a Visualforce page I am outputting fields of ContentNote (such as "CreatedDate") using the same pattern that already works for Note (and many other types) where the sob is a reference to the ...
Keith C's user avatar
  • 136k
2 votes
1 answer
3k views

"Unable to create/update fields: VersionData" error when updating a ContentNote from Apex

I have some Apex code that inserts a ContentNote and the corresponding ContentDocumentLink. This works fine and the data can be viewed through the normal Salesforce UI. But some further code that ...
Keith C's user avatar
  • 136k
6 votes
0 answers
557 views

How to detect a size change for a ContentDocument or a ContentNote in a trigger?

Both ContentDocument and ContentVersion have a ContentSize field documented to be: Size of the document in bytes but after adding debug code to check that field for both types for these events: ...
Keith C's user avatar
  • 136k
12 votes
2 answers
3k views

How to distinguish between ContentDocument and ContentNote?

There seems to be some unusual stuff going on with SObjectType for the enhanced note ContentNote (ERD) object and the underling ContentDocument (ERD) structure. For example, both these return a ...
Keith C's user avatar
  • 136k
1 vote
0 answers
216 views

Translate IsPrivate check into Enhanced Notes

I am migrating notes into Enhanced Notes, How do I move the IsPrivate(Checkbox on Notes) values into Enhanced Notes? If the IsPrivate Checkbox is checked on Notes, how can I do this on EnhancedNotes?
manjula's user avatar
  • 11
4 votes
1 answer
739 views

Why is this ContentNote test failing?

The assertion in this test - a stripped down version of a bigger to illustrate the specific problem - that has the comment: // This assertion fails: 'Hello' is returned not 'World' fails: @IsTest ...
Keith C's user avatar
  • 136k
1 vote
1 answer
3k views

Trigger on Notes (lightning)

Requirement: If a note is added to either an account, contact, opportunity, task and event for particular record types and the current user is not an administrator and not a user mentioned in system ...
SFDC_Dev's user avatar
  • 293
0 votes
1 answer
317 views

Problem in Covert ( image,line break,Numbers) from blob into string on Visualforce page

I have written a code to convert the blob content into string to display it on Visulaforce page.Its working.But I couldn't able to show the image.I mage is also converted as string like : <img src=...
JURY's user avatar
  • 183
5 votes
0 answers
199 views

Impossible to navigate to a related contentNote in custom Lightning component

I'm building a 'simple' component that displays a list of notes related to a collaborationGroup. Basic functionality works. I am unable to make the note title into a link, and just discovered tha ...
gorav's user avatar
  • 4,537
-4 votes
1 answer
4k views

How to escape html characters in long text area field

I have a requirement where i need to copy the contents of a contentnote to a longtextarea field called 'comments' using apex anonymous. The issue is i am getting the following HTML characters for ...
Meena's user avatar
  • 57
0 votes
1 answer
1k views

ContentNote not showing correctly

I'm linking a ContentNote to a Lead object, but the notes that i've been making are showing symbols like "��br��z{^�Ʃx{f" instead of what is provided in the post call to the api. Any ideas on why ...
Oscar Or's user avatar
0 votes
0 answers
460 views

How to restrict specific profiles to create note

I need to restrict users with a specific profile to create Note in Salesforce for under lead object. I know that Note object will inherit access level from parent Lead. I need lead to be accessible ...
SFDC_Igle's user avatar
  • 692
1 vote
1 answer
154 views

Creation of ContentNotes in Apex suddenly failing with System.UnexpectedException: Note can't be saved error

I have some batch code that creates ContentNotes in Apex. It was working perfectly well until all of a sudden last night it stopped working without any code changes whatsoever. It is now throwing the ...
ArtieBrosius's user avatar
1 vote
0 answers
439 views

How to show error msg in ContentNote?

I want to show error msg whenever notes get created without attaching to any records. As trigger on ContentNote is not available I've written Trigger on ContentDocumentLink, but I am not able to show ...
Keval Suchak's user avatar
0 votes
1 answer
615 views

Prevent deletion of ContentNote

Is there anyway to prevent a user from deleting a New Note, based on the status of the Opportunity that the contentnote is linked to? The requirement is that I have a datetime field that is set, once ...
sfnoob's user avatar
  • 55
1 vote
1 answer
79 views

How to check ContentNote settings

I am working on managed package, it works fine and everybody is happy. In latest version I've added one trigger that works with ContentNote sObject. Issue is that when I try to install it to the ...
user49158's user avatar
1 vote
3 answers
17k views

ContentDocumentLink insertion fails

I want to share all records with admin user using next trigger: trigger ContentVersionTrigger on ContentVersion (after insert) { system.debug('sdfsdf' + Trigger.new); for (ContentVersion ...
user49158's user avatar
1 vote
2 answers
626 views

Assigning owner to ContentNotes

I am trying to assign the OwnerId to ContentNote (Notes) using Data Loader on new inserts, however I get the following error: Documents in a user's private library must always be owned by that user....
Deployment Failure's user avatar