web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

"The requested record was not found or you do not have sufficient permissions to view it" on appointment create

(0) ShareShare
ReportReport
Posted on by 50

Hi everyone,

we are facing a really strange issue came up suddenly yesterday morning without any apparent reasons (no new customizations installed or solutions updated in Solution History): our customer is completely prevented from creating appointments through the classic main form (which we have customized a bit in the past, but not touched in the last couple of months) getting the classic error "The requested record was not found or you do not have sufficient permissions to view it".

Before you asks, there are not workflows or plugins that change the records' ownership on creation.

After some research, i found out that everything is caused because an inexplicable CRM behaviour on first appointment onSave form event; here's the result of my attempts:

  1. i wrote a little piece of code for the OnSave form event that is alerting the record Id through formContext.data.entity.getId() function;

  2. if i create an appointment inside Sales Hub app, everything runs fine, but we have also a main difference here because since Wave 2 release Sales Hub opens activities forms as modals on top of the page
    pastedimage1614628266979v1.png
    As you can see the code alerts nothing, as we're normally expecting from the onSave event that is triggered immediately before the record save finalization.

  3. Now if we try this in other apps, such as our custom app called "Visite" or the legacy "Dynamics 365 - custom" app, the creation form for activities is opened as usual as a page
    otherAppAttempt.jpg
    As you can see, with the very same form (just opened differently) and the very same piece of code now we managed to alert the record id during the onSave event, so before the record was committed to the CRM DB.

This anomaly leads to an error in OOB library “Appointment_main_system_library.js”, in function “Activities.SchedulingEngine.BookOrReScheduleAppointment” which is also triggered during onSave event form
oobCrmError.jpg

As you can see, the "IF" condition checks for the presence of the record Id during save, assuming to not to have a record id yet on create in order to launch the “Create Flow” which triggers the BookRequest.

Due to our anomaly we have a record id already during creation before the save finalization; this bring us in the other branch of the condition (the one meant for the update) which triggers RescheduleRequest, the source of our error:
oobCrmError2.jpg

Does anyone has an explanation for this strange and sudden behaviour? As i said we haven't touched the system in a couple of months and users were able to create records without errors since 48h ago.

Thanks in advance.

I have the same question (0)
  • cloflyMao Profile Picture
    25,210 on at
    RE: "The requested record was not found or you do not have sufficient permissions to view it" on appointment create

    Hi Daniele,

    In my environment, the appointment id is not available for both classic form and Sales Hub form at OnSave event of Appointment:

    in my classic form, alert will appear before showing "Saving..." backdrop, so is it the behavior same to yours?

    Additionally, if it goes to the else branch, it indicates that Xrm.Page.data.entity.getId() is available and will be a valid value to be assigned to activityid attribute of clonnedEntity object.

    (The appoint id can be found in RescheduleRequest response message.)

    To sum up, it seems that there is an issue to creation process of your classic form of appointment: the record has returned an id, but it is not recognized as system as a created/existing record.

    Please check whether the issue occurs to other users and administrator(I tested as admin).

    Regards,

    Clofly

  • Daniele.Torlai Profile Picture
    50 on at
    RE: "The requested record was not found or you do not have sufficient permissions to view it" on appointment create

    Hi Clofly,

    the onSave behaviour is the same, the strange thing as i wrote is that we have a record id too soon when the appointment itself is not committed to CRM DB yet: i know this for sure because the issue is happening with a System Admin user so we excluded the permission issue from the beginning.

    Today i found out a very interesting thing: i omitted (sorry for that, i just didn't think that would be relevant) that the issue is somehow connected to one a custom BPF we created that starts with appointments and ends in a custom entity.

    If i add the BPF in any app (also the Sales Hub) the issue occurs, if i remove the BPF it doesn't instead.

    Anyway Microsoft sent me a managed solution in order to disable an environment setting called "FCB.AppointmentSchedulingInUCI"; i'm about to trying it.

    I will surely keep you updated as soon as i have some news about this.

    Thanks a lot for the help.

  • cloflyMao Profile Picture
    25,210 on at
    RE: "The requested record was not found or you do not have sufficient permissions to view it" on appointment create

    Hi Daniele,

    Thanks for sharing more details about the issue.

    I am looking forward to your reply and the solution. :)

    Regards,

    Clofly

  • Verified answer
    Daniele.Torlai Profile Picture
    50 on at
    RE: "The requested record was not found or you do not have sufficient permissions to view it" on appointment create

    Hi Clofly,

    i confirm that disabling the FCB.AppointmentSchedulingInUCI option did the trick.

    Anyway it's evident that some "background updates" of OOB CRM scripts have broke something related to appointments connected to BPFs. I hope for a definitive solution, but this workaround for now is sufficient.

  • cloflyMao Profile Picture
    25,210 on at
    RE: "The requested record was not found or you do not have sufficient permissions to view it" on appointment create

    Hi Daniele,

    It is very glad your problem has been solved and thanks for your solution. :D

    I will mark your answer as verified to close the thread.

    Regards,

    Clofly

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 258

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 178

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 142 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans