Questions tagged [contentnote]
The contentnote tag has no usage guidance.
67
questions
1
vote
1
answer
410
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 ...
0
votes
1
answer
386
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....
-1
votes
1
answer
83
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.
0
votes
1
answer
227
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 ...
0
votes
1
answer
66
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 ...
0
votes
1
answer
161
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 ...
2
votes
1
answer
686
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));
...
0
votes
1
answer
159
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 ...
0
votes
1
answer
395
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 '...
0
votes
0
answers
359
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 ...
2
votes
1
answer
577
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
@...
0
votes
2
answers
113
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, ...
2
votes
1
answer
263
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 ...
5
votes
0
answers
240
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
...
1
vote
1
answer
320
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/...
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 ...
1
vote
1
answer
255
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 ...
0
votes
0
answers
288
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:
...
-2
votes
2
answers
825
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');
}
...
0
votes
1
answer
275
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 ...
0
votes
1
answer
463
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 ...
2
votes
2
answers
6k
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 ...
2
votes
2
answers
878
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+...
0
votes
0
answers
188
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/...
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 ...
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 ...
2
votes
2
answers
271
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 ...
6
votes
2
answers
128
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 ...
1
vote
2
answers
1k
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 ...
4
votes
1
answer
511
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 ...
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 ...
2
votes
1
answer
2k
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 ...
6
votes
0
answers
492
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:
...
12
votes
1
answer
2k
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 ...
1
vote
0
answers
208
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?
4
votes
1
answer
717
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
...
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 ...
0
votes
1
answer
300
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=...
5
votes
0
answers
174
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 ...
-4
votes
1
answer
3k
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 ...
0
votes
1
answer
947
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 ...
0
votes
0
answers
377
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 ...
1
vote
1
answer
141
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 ...
1
vote
0
answers
422
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 ...
0
votes
1
answer
583
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 ...
1
vote
1
answer
77
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 ...
1
vote
3
answers
15k
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 ...
1
vote
2
answers
548
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....
18
votes
1
answer
4k
views
Lightning Components: how to invoke "New Note" panel from custom components?
On the Standard-Related-List "Notes" there is a New Button. This New Button opens a Panel on the bottom of the screen like this:
How can I invoke the opening of this "New Note" Panel? I've tried so ...
0
votes
1
answer
417
views
E-Mail Body to ContentNote. Note can't be saved because it contains HTML tags
16:11:34:630 USER_DEBUG [25]|DEBUG|<div dir="ltr"><br><div class="gmail_quote">---------- Weitergeleitete Nachricht ----------<br>Von: <b class="...