Anchors and new document versions
Anchors are copied to new versions automatically
When a document gets a new version, its anchors come with it, so authors don't have to re-link every Scientific Statement on every version. There is nothing to set up or turn on.
Every new version that replaces a previous one gets a copy of every anchor that touches the previous version, at either end: anchors whose Scientific Statement is in this document, and anchors whose Reference is in this document. This applies when you upload a new version or create a new draft. The previous version keeps its own anchors.
Anchors are copied in the background by the user who created the new version. Each copy is a new anchor with its own anchor number, and the Anchors panel shows that user and the time of the copy as its author and date. The copy is made even if that user doesn't have the content anchoring permissions. Anyone who can manage anchors on the document can edit, repoint, or remove a copy; visit Anchor visibility and permissions. Just after you create a version, its Anchors panel may still read "No links yet". Click Refresh anchor list or reload the page to see the copied anchors.
Because the previous version keeps its anchors, the other document's Anchors panel lists an anchor once for each version: the original and each copy, each with its own anchor number.
Copying an anchor never changes its status. An Active anchor stays Active and a Stale anchor stays Stale on the new version. Removed anchors are not copied.
When the file has not changed
If the new version's file is identical to the previous version's file, anchors are copied exactly as they were and no anchor is newly flagged. An anchor that was already flagged for checking stays flagged.
This includes a new draft that reuses the published version's file. Because the Anchors panel lists anchors by file, the draft and the published version then both list the original anchor and its copy, so each anchor appears twice on both. This is expected.
When the file has changed
If the file changed, the passages may have moved, so each copied anchor is flagged for the author to check. A flagged anchor shows:
| Where | What you see |
|---|---|
| Anchors panel header | A count such as 3 to check. The tooltip reads "Anchors that have not been confirmed against this version - open each one and check it still points at the right passage". The count disappears when no anchors need checking. |
| Anchors panel row | An amber Check chip next to the anchor number. The tooltip reads "Not precise — this anchor was carried forward without being confirmed, so it may no longer be on the right passage. Open it and check." The status is unchanged, so a row can show both Check and Active. |
| Document preview | A hollow, dashed marker instead of a solid one. |
The flag belongs to the anchor, not to one end, so the anchor is flagged in both documents' panels and previews. The flag does not say which end changed. An anchor that was already flagged stays flagged until someone confirms it.
A Whole document anchor whose Reference document gets a changed file is not flagged, because there is no Reference passage to check.
The Check chip is about where the passage is. It is different from the Precise and Whole doc link type chip on the same row.
If you open the anchor's Scientific Statement document or Reference document, the passages may be found again automatically; visit Anchors are re-found automatically.
Check a flagged anchor
There is no separate confirm button: editing the anchor is the confirmation. Automatic re-finding can also confirm an anchor; visit Anchors are re-found automatically.
-
Open the anchor from the Anchors panel and check whether the highlight is on the right text.
-
If a passage moved, fix it:
You only need to fix the end that is no longer on the right text. An end whose file didn't change, or whose passage was found again exactly, is already confirmed. An end that was moved to a best match stays flagged until you select its passage again, even if the position is right.
-
If the anchor is no longer valid, remove it.
When both ends are confirmed, the Check chip disappears and the marker is solid again. Changing only the link type doesn't confirm a passage, but changing an anchor to Whole document removes its Reference passage from the check: if only the Reference end was flagged, Check disappears.
Anchors are re-found automatically
When a user who has the Content Anchoring User custom permission opens a document, the viewer searches that document's text in the background for the flagged anchor passages it holds, at either end of the anchor. There is no message or progress indicator. When the search finishes, the Anchors panel and markers refresh once. For each anchor that was moved, the user who opened the document is recorded in its Matched By field; the author shown in the panel doesn't change.
- If the whole passage is found exactly once, that end is moved to it and confirmed. If the anchor's other end is already confirmed, the Check chip disappears.
- If the passage is found more than once on different pages, the anchor is moved to the occurrence on the page nearest its old position (if one page is nearest), but it stays flagged for you to confirm.
- If the passage was reworded, but a few words of it are found once (or nearest its old page), the anchor is moved there and stays flagged for you to confirm.
- If the passage appears more than once on the same page, or no part of it is found in time, the anchor stays flagged at its copied position. The search is tried again the next time the document is opened.
The system never confirms an anchor it only guessed at. An end that is moved to a best match stays flagged until you select its passage again by editing the anchor, or, for the Reference end, by repointing it, even if the new position is right. An anchor is confirmed only when both of its ends are confirmed.
Keep these points in mind:
- Up to 50 flagged anchor ends are searched each time a document is opened, so a document with many flagged anchors is worked through over several opens. Each search is stopped after 20 seconds.
- Re-finding runs only in the enhanced document viewer. An anchor end on a file that opens in Salesforce's content previewer is never searched, so an anchor whose flagged end is on such a file stays flagged until you fix it by hand.
- Matching ignores differences in spaces, line breaks, curly and straight quotes, dash styles, non-breaking spaces, and words hyphenated across a line break. Matching is case-sensitive, and passages shorter than 20 characters are never searched.
- A Reference passage is searched for only when the Reference document is opened, by a user who can read both documents. Whole document anchors have no Reference passage to search for.
- An anchor is changed automatically only when its Scientific Statement document is in its
lifecycle's initial, in-review, or rejected state. With the default (
CM_Default) lifecycle, that is Draft, In Review, or Rejected. Anchors whose Scientific Statement document is published, superseded, obsolete, or withdrawn (Expired), or is in a status that the lifecycle doesn't name in one of those roles, such as In Approval, Review Complete, or Approved, are never changed automatically, even when you open the Reference document. The Reference document itself can be published. - Re-finding uses the viewer's own text search. It doesn't use Data 360 or Content Search Settings, and works the same in every org.
- A background search can clear a search you typed in the viewer's own search bar. Run your search again.
Move an anchor to a newer approved version
When you are working on a document whose version is in its lifecycle's initial, in-review, or rejected state, and one of its References has a newer version in its lifecycle's Published State (the offer calls it "approved") that you can read, that anchor's row in the Anchors panel shows "A newer, approved version of "title" is available." with a Move anchor button. The offer appears only on rows whose other end is the Reference, and only on the anchor's own Scientific Statement version, not on another version that shares its file.
-
Click Move anchor.
Both documents are checked again. If the move is allowed, the anchor now points to the newer version as a Whole document link, and the message "Anchor moved" reads "The anchor now links to the newer version of "title". It links to the whole document for now — repoint it to a specific passage once you have reviewed the new version."
-
Repoint the anchor to pick the Reference passage in the newer version.
If something changed after the offer appeared, the anchor isn't moved and the message "Could not move the anchor" explains why:
| Message | What it means |
|---|---|
| "The newer version of the Reference document is no longer approved." | The newer version left its published state. The anchor still cites the older version, and the offer is hidden until you open the document again. |
| "The status of the Scientific Statement document no longer allows this change." | The Scientific Statement document is no longer in an initial, in-review, or rejected state, for example because it was published. |
| "Could not check the status of the Scientific Statement document." | The status check didn't complete. Try again. |
The offer is only a suggestion. You can keep citing the older version.
When anchors are not copied
- Copied documents. Clone Document creates a new document with no anchors.
- Versions created through the Regulated Content Cloud REST API
(
POST /mcm/v1/documents/{documentId}) start with no anchors, and nothing is logged. - Documents displayed through a rendition. When a document version is viewed through a viewable rendition (for example, a PDF rendition of a Word file), its anchors belong to the rendition's file and are not copied to the next version; a warning is written to the Debug Log, depending on the org's log level. If a version gets a viewable rendition after anchors were created on or copied to its own file, those anchors no longer appear in that version's Anchors panel or viewer, and nothing is logged. They still appear in All Anchors and in the other document's Anchors panel. Anchors on the version's own file, created before it had a rendition, are still copied. Visit Renditions.
- Several versions of one document created by one script or bulk load. When one transaction creates a version and then a newer version of the same document, the newest version can end up with no anchors. A warning is written to the Debug Log only when both versions are saved together in one operation.
- Versions created by custom background Apex. If your org's own Apex creates a version in a batch job, a future method, or a queued job, the anchors may not be copied, and nothing is logged. Versions created in Regulated Content Cloud, including by its own scheduled jobs, are not affected. Visit For administrators.
In these cases, create the anchors on the new version again.
For administrators
There are no settings for copying anchors to new versions or for automatic re-finding.
Anchors are copied by a queued Apex job that starts after the new version is saved. Custom Apex
that creates document versions in a batch job, a future method, or a queued job must call
QueueableChainContext.enqueueCurrentQueueableChain() before it finishes, as the batch jobs that
Regulated Content Cloud provides do. Otherwise the copy job never starts for those versions.
Each Anchor Link record stores how its position was last established. These fields have no screen;
read them with a SOQL query. Their changes are kept in field history
(mvn__WV_Anchor_Link__History):
| Field | API name | Description |
|---|---|---|
| Match State | mvn__WV_Match_State__c | Precise (default) or Not precise. Not precise is shown to users as Check. |
| Match Method | mvn__WV_Match_Method__c | How the anchor was last placed: Manual (by a person), Unchanged file (copied to an identical file), Exact text match, or Best match (found by automatic re-finding). Blank while a copied anchor is flagged and none of its passages has been found again. An anchor moved to a best match shows Best match until it is confirmed, and while one end has been found exactly and the other hasn't, a Not precise anchor shows Exact text match. A Whole document anchor whose Reference file changed keeps Match State Precise and its previous method. |
| Matched On | mvn__WV_Matched_On__c | When the anchor was last placed or confirmed. |
| Matched By | mvn__WV_Matched_By__c | Who placed or confirmed the anchor. For a copied anchor, the user who created the new version; for an anchor re-found automatically, the user who opened the document. |
Four checkbox fields, Scientific Statement Relocated, Reference Relocated, Scientific Statement Best Match, and Reference Best Match, are maintained by the system for automatic re-finding. Don't edit them.
For example, to list anchors that still need checking:
SELECT Name, mvn__WV_Match_State__c, mvn__WV_Match_Method__c, mvn__WV_Matched_On__c,
mvn__WV_Matched_By__r.Name, mvn__WV_Status__c
FROM mvn__WV_Anchor_Link__c
WHERE mvn__WV_Match_State__c = 'Not precise'
Warnings and errors are written to the Debug Log
(mvn__Debug_Log__c) object when anchors are not copied, for example for rendition-backed
versions, chained versions saved together in one operation, a file with more than 2,000 anchors, or
a very large batch that
reached a processing limit. Whether warnings are stored depends on your org's
log level. The anchors that were not copied
remain on the previous version, and the log message names the limit that was reached. Contact
customer support before you re-create those anchors by hand.
