function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
NLTNLT 

Custom Edit button to check whether particular user is having record access to Read/Write then only it should move existing page otherwise display can't perform this action.

Need to create Custom Edit button to check whether user is having record access to Read/Write then only it should move existing page otherwise display can't perform this action.
SwethaSwetha (Salesforce Developers) 
HI NLT,

You can create a custom button to perform specific actions on records.This button can be added to the page layout of the object you want to edit.

In the custom button's logic, you can use Apex code to check the user's record access using the UserRecordAccess object. If the user has Read/Write access, the button can navigate to the existing page for editing. Otherwise, you can display a message indicating that the user does not have permission to perform the action.

Example code:
// Get the UserRecordAccess for the current user and record
UserRecordAccess access = [SELECT HasEditAccess FROM UserRecordAccess WHERE UserId = :UserInfo.getUserId() AND RecordId = :recordId];

// Check if the user has Edit access
if (access.HasEditAccess) {
    // Redirect to the existing page for editing
    PageReference editPage = new PageReference('/' + recordId + '/e');
    editPage.setRedirect(true);
    return editPage;
} else {
    // Display a message indicating that the user does not have permission
    ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, 'You do not have permission to perform this action.'));
    return null;
}

Related:
https://salesforce.stackexchange.com/questions/175/can-i-find-out-if-the-current-user-has-access-to-a-record-without-querying
https://developer.salesforce.com/forums/?id=9062I000000DGpEQAW

If this information helps, please mark the answer as best. Thank you