
Client Portal Document Versions: Keep Reviews and Approvals Attached to the Right File
Manage client document revisions with stable identities, version-specific decisions, clear current-file labels, and controlled access.
Custom Portals
Design a portal’s primary-document selection around stable file identity, explicit permissions, replacement rules, and downstream references.

LET’S BUILD SOMETHING USEFUL
Talk to ATARAXY DEVELOPERS (SMC-PRIVATE) LIMITED about your website, app, or custom software.
A portal record may contain several useful files: a proposal, supporting drawings, an amended agreement, and a final signed copy. Marking one as the primary document can make the record easier to use, but the choice needs a precise meaning. “Primary” should not silently mean newest, approved, public, or safe to share.
Treat primary-document selection as a relationship between a record and an existing file. Preserve the file’s identity and history while making the preferred entry point clear. This allows the portal to support convenient navigation without losing track of which document was actually reviewed, downloaded, or referenced elsewhere.
Start with the task the selection supports. A project portal may use the primary document as the default preview; a supplier portal may use it as the main evidence file for a requirement. These are different purposes and may require different eligibility rules.
Write the rule in a sentence that users can understand. For example, “The primary file opens first when an authorized project member views this record.” That statement does not imply approval or change access. If the product also needs an approved document, represent that status explicitly rather than relying on a star icon to carry several meanings.
Decide whether a record may have no primary file. A newly created record or a record whose selected file was withdrawn may legitimately lack one. Show that state clearly instead of choosing an arbitrary attachment simply to avoid an empty field in the interface.
Keep the primary selection tied to a stable file or document identifier, not a display name or list position. Names can change and lists can be sorted. A record should not switch its primary document merely because another upload has the same title or appears first after a refresh.
For a hypothetical project, the selected proposal might later be renamed to include a customer reference. The primary relationship should continue to identify the same file. If a new proposal is uploaded, it should become primary only through the defined replacement action, not through a filename collision.
Also distinguish the document from its versions if the portal supports versioning. Decide whether primary selection points to a document whose current version evolves or to one specific immutable version. Explain that choice wherever a user reviews or shares the selection, because downstream consumers may require a fixed reference.
Provide a clearly labeled action such as “Set as primary document” on eligible files. Show the current selection in both the attachment list and the record summary. After a change, confirm which file is now primary without suggesting that it has been approved unless an approval action actually occurred.
If the selected file is replacing another, a brief confirmation can identify both names and the effect on the default preview. Avoid a generic “Are you sure?” dialog that hides the consequence. For routine low-impact selection, an immediate change with a clear result may be sufficient; choose the interaction according to the workflow.
Preserve the user’s location after the action. Reordering the entire attachment list can make it difficult to see what changed. If primary files are intentionally pinned, make the movement understandable and keep keyboard focus on a relevant control or confirmation.
The OWASP authorization guidance recommends least privilege, default denial, and permission checks on every request, including access to resources identified by user-supplied identifiers. Apply those principles to selecting, previewing, and downloading the primary file.
A user who can view the record may not be allowed to change its primary document. Likewise, making a file primary should not automatically broaden its audience. Evaluate the person’s permission for the actual file when serving its contents, rather than assuming that the record’s primary pointer grants access.
Test a record containing files with different visibility rules. An external collaborator should not gain a download route to an internal document through a summary card or preview endpoint. When the chosen primary file is unavailable to that viewer, show an appropriate explanation or permitted alternative without leaking restricted metadata.
Define what happens when the selected file is deleted, withdrawn, quarantined, or moved. The record should not retain a broken link that appears to be a valid primary document. Depending on the workflow, clear the selection, require a replacement, or show a visible unavailable state with an authorized repair action.
Avoid silently selecting the next file in the list. That file may be an unrelated receipt or an outdated draft. Ask the responsible user to make a new choice where the meaning matters, and record the transition so another reviewer can understand why the default changed.
Test replacement while two users are viewing the record. If both attempt to select a different primary file, the application should handle the conflicting updates according to a defined concurrency rule. Show the final saved selection rather than leaving each browser convinced that its own choice remains current.
Inventory the places that use the primary document: email previews, exported summaries, workflow tasks, approval screens, and shared links. Decide whether each should follow the current primary selection or preserve the file selected at the time the downstream item was created.
An approval request, for example, should make clear which document or version the reviewer is approving. If the primary selection changes afterward, do not rewrite the historical approval to imply it covered a different file. Store the relevant reference with the approval record and display it when the decision is reviewed.
For a general record landing page, following the current primary selection may be intentional. Label the route accordingly and keep its access checks current. The important distinction is between a live convenience link and a historical reference whose meaning must remain stable.
Test duplicate filenames, long titles, missing previews, restricted files, and a record with no attachments. Use keyboard navigation and a narrow screen to confirm that the primary indicator does not replace the file name or obscure the available actions. Include the unavailable-file state in screenshots and interaction checks.
AI can suggest a likely primary document based on permitted metadata, but present it as a suggestion where selection carries business meaning. Require an authorized user or an explicitly approved deterministic rule to apply the change. Keep the reason visible and avoid letting a confident filename classification alter an approval reference.
A useful primary-document feature selects an entry point without rewriting identity, access, or history. Define its meaning, store stable references, handle replacement explicitly, and inspect every downstream use. Users can then find the right file quickly while the portal preserves what was actually selected and reviewed.
LET’S BUILD SOMETHING USEFUL
Talk to ATARAXY DEVELOPERS (SMC-PRIVATE) LIMITED about your website, app, or custom software.