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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Sales forum / OnSave Event Handler n...
Sales forum

OnSave Event Handler not executing for a custom user security role

(0) ShareShare
ReportReport
Posted on by 75

Hi,

I have a strange issue whereby a JavaScript function configured to execute OnSave is not triggering for only users with a new security role I created.

The Admin user when logged in can SAVE the record and it triggers the OnSave event. I can debug in the browser developer tools and step through the function. But if I login with a user with non admin privileges the breakpoints are never hit.

I read of similar issues where adding 'Process', 'Process Session' and 'Process Configuration' Read permission to the user role fixed the issue. I applied the same permissions to my custom role but still no joy?

Any ideas would be appreciated.

Kind Regards

M Khan

I have the same question (0)
  • MihirShah Profile Picture
    4,036 on at

    Do you get this error with an OOTB security role like Sales Person ?

    If not than copy the OOTB security role and modify it to meet your custom security role requirements.

    Hope this helps.

  • MK77 Profile Picture
    75 on at

    The user in question has Sales Person OOTB, Customer Service OOTB plus for the custom entities I created a separate custom role. There I have added read write permissions for the custom BPF and Custom Entities.

    Good suggestion though but might not apply in this scenario. thanks.

  • MK77 Profile Picture
    75 on at

    Further testing shows that in fact the JavaScript function file is not downloading for the non admin users. Still no clue why this is the case. I have removed this WebResource and added it again with no change in behaviour.

  • Suggested answer
    MK77 Profile Picture
    75 on at

    Thanks for all your responses. The issue was form "Enable Security Roles" related after all.

    I am not sure whether by DEFAULT on custom form the security is only enabled for System Administrator and System Customizer Roles only OR one of my team members restricted access to these two roles.

    But on reviewing these the and enabling the form for other Roles the JS script started to download for non admin users.

    lesson learned do not assume, always check and double check especially in a team environment.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Sales

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans