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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Real world usage of Pr...
Power Apps
Unanswered

Real world usage of Prevalidation plugin

(0) ShareShare
ReportReport
Posted on by 971

Hello experts,

 

I am looking for a real world use case of using Pre-validation plugin.

 

I know below things about pre-validation plugin from docs page but I would like to know more about this plugin usage -

1. Runs outside the database transaction

2. Executes before security role check

3. First stage in the plugin execution pipeline.

 

Thanks,

Bipin

I have the same question (0)
  • Ram Prakash Duraisamy Profile Picture
    5,593 Super User 2025 Season 2 on at

    Hello @bipinshan,

     

    PreValidation will only trigger in Stage Number : 10 and It will Run only in SYNC mode.

     

    Please mark as Answer if it is helpful and provide Kudos

     

    Subscribehttps://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA

    Blog : https://microsoftcrmtechie.blogspot.com

  • Bipin D365 Profile Picture
    971 on at

    Hi @rampprakash ,

     

    really appreciate your response.

     

    I am looking for a real project use case of adding the code on this stage.

     

    One thing which I know is - When you create any record in this stage and subsequent plugin stages failes the records created in pre-validation stage will not be rolled back and it will still be present in the system.

     

    Thanks,

    Bipin

  • Ram Prakash Duraisamy Profile Picture
    5,593 Super User 2025 Season 2 on at

    Hello @bipinshan,

     

    That depends on the Use Case 🙂 and i didn't tried your scinario 🙂 Lets wait for others comments too

     

    Please mark as Answer if it is helpful and provide Kudos

     

    Subscribehttps://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA

    Blog : https://microsoftcrmtechie.blogspot.com

  • Bipin D365 Profile Picture
    971 on at

    Hi @rampprakash ,

     

    I found below interesting article which talks about usage of Pre-validation plugin

    https://nishantrana.me/2018/11/05/plugin-on-pre-validation-stage-in-dynamics-365-ce/

     

    Question - If I delete account record and requirement is to perform some logic based on related child records of account which has relationship behaviour set to cascade All, where do I need to register my plugin ?

    I know post operation plugin will not have any details of related record, those will already be deleted from the system.

     

    I want to know if I can register on Pre-operation?

     

    Thanks,

    Bipin

  • Verified answer
    Ram Prakash Duraisamy Profile Picture
    5,593 Super User 2025 Season 2 on at

    Hello @bipinshan,

     

    But this is not a Real time use case, its a Reference in the Relationship. Not sure what you are expecting dude. Because the Initial Question is - What is the Use of PREVALIDATION Plugin.

     

    To Answer your Question, If you want to Perform such Kind of Operation, USE RESTRICT DELETE if CHILD RECORDS available, user can manually reassign the records and proceed further.

     

    Please mark as Answer if it is helpful and provide Kudos

     

    Subscribehttps://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA

    Blog : https://microsoftcrmtechie.blogspot.com

  • Bipin D365 Profile Picture
    971 on at

    Hi @rampprakash ,

     

    Thanks for your reply.

     

    I can not use Restrict Delete in my case. I want my child records to be deleted from teh system when parent record is deleted. But I would also like to perform some logic to deduct values from another field from child records.

     

    How can we achieve this?

     

    I tried registering plugin on Pre-operation but when we retrieve child records from plugin it returns zero record.

     

    I will try registering in Pre-validation stage and let  you know my findings.

     

    Thanks,

    Bipin

  • Verified answer
    Bipin D365 Profile Picture
    971 on at

    Hello,

     

    I have registered my plugin on Pre-validation stage and I was able to retrieve child records and perform calculations.

     

    Thanks,

    Bipin

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard