Questions tagged [contentnote]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
18 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
2answers
50 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
1answer
55 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
1answer
57 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 ...
0
votes
2answers
312 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
2answers
135 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
0answers
16 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
2answers
498 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
0answers
46 views

Unlocked Packages and Enhanced Notes

Is anyone having trouble with the enhanced notes related list showing up on a standard page layout after an Unlocked Packaging deployment? I just tried doing this, and even after manually adding the ...
0
votes
2answers
136 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
2answers
117 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
2answers
70 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
2answers
299 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
1answer
244 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
0answers
263 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
1answer
311 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 ...
5
votes
0answers
124 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: ...
7
votes
1answer
445 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
0answers
100 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
1answer
225 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
1answer
661 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
1answer
81 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
0answers
85 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
1answer
538 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
1answer
259 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
0answers
55 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
1answer
80 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
0answers
235 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
1answer
198 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
1answer
43 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 ...
0
votes
3answers
5k 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
2answers
168 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....
17
votes
1answer
1k 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
1answer
217 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="...
2
votes
1answer
221 views

Linebreaks in Flows to populate body of contentNote

I have a flow that populates the content of a ContentNote record. i use a formula that combines values from various variables in the flow and concatenate it.This concatenated text is displayed in the ...
1
vote
1answer
555 views

Not able to retrieve Notes(ContentNote Object) in Account

When i tried to pull "ContentNote" i was getting the below exception. INVALID_TYPE: sObject type 'ContentNote' is not supported. If you are attempting to use a custom object, be sure to append the '...
0
votes
1answer
148 views

Batch Apex creating Multiple contentdocumentlinks when trying to “convert” tasks to notes…

I am trying to look at all tasks for a specific time frame, then create a note and set the LinkedEntityId to the whatid or whoid. This code creates the content note, 1 for each task. But then created ...
0
votes
2answers
169 views

Trigger error : create a note

I'm writting a trigger that have to create a new note (ContentNote) when a field is filled (toNote__c ). The trigger had to occurs when the record is updated. Here is the trigger : trigger ...
2
votes
1answer
78 views

How to use Sfdc.ChatterNotes.createNote() in my visualforce page to add a Note to my custom object?

I'm trying to have a button in my VFP that'll add a Note (AttachedContentNote) to my custom object. I want my button to do the same as the New Note button from the Note's relatedList in my custom ...
4
votes
1answer
630 views

Why are no results returned when performing a SOSL query on ContentNote in a Test Method?

Following the example laid out in Adding SOSL Queries to Unit Tests, I created a test method that inserts a ContentNote record, sets the results using Test.setFixedSearchResults(), and then performs a ...
0
votes
1answer
153 views

Data load to ContentNote Object using any tool (Informatica Cloud or DataLoader)

I found the below link (another question) - this does not seem to be a correct answer and am urgently looking for a solution for the same. ContentNote with related Object After loading the ...
2
votes
1answer
2k views

New Notes (ContentNote) Note Sharing Settings via Trigger

Is it possible to manipulate note sharing settings in a trigger? (after insert) I wanted to set a default specific set of users whenever a new note is created. I've tried searching everywhere to no ...
0
votes
2answers
2k views

List of Special Character that not acceptable in Content Note conversion

I am doing old Note conversion to new Note. For some special character , I can use escapeHTML4() and it works like charm but for some character such as '£', '~' is fail.I tried to use escapeUnicode() ...
0
votes
1answer
352 views

New Note button doesn't properly set retURL for VF pages?

We are not using Lightning, but recently transitioned to using the new 'enhanced note-taking tool'. We use a VF page for our Opportunity object, and have the new Notes related list on our page: <...
0
votes
2answers
2k views

Query all Content Notes of an opportunity

How would I query the ContentNotes of an opportunity? I'm able to query all the ContentDocumentLink and able to get the ContentDocument but the ContentDocument does not have the fields that I'm ...
1
vote
1answer
3k views

Inserting a Content Note

The ContentNote represents a Note in Salesforce so I'm trying to insert one into a specific opportunity but I don't understand how to specify the right opportunity id. https://developer.salesforce....
2
votes
2answers
2k views

Creation order of ContentNote and ContentDocument

When you create a new enhanced Note in the UI, it creates a ContentNote and a ContentDocument record. Does anyone know the creation order of the records? Client wants me to write a trigger for the ...
0
votes
1answer
154 views

ContentNote Load using Informatica Cloud

Background : We have lot of junk data from source for Lead object and the same is suggested to be concatenated and loaded to Notes. Issue: We could load the Title and Content - For Titel - A ...
1
vote
1answer
1k views

ContentNote with related Object

I am trying to do insertion with Salesforce Ligtning ContentNotes through Data Loader. How can I insert a ContentNote with related object? For example, I have a note 1 with Title: "Note 1" and ...
2
votes
2answers
2k views

How to move/migrate old notes to new Notes?

With the new Notes, my users complain that they want all of their old notes in the new format. Knowing dataloader, I am trying to export all of the old notes and insert as new Notes, but I can't find ...