Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Editable Grid - Prevent Save if condition fails

Posted on by 35

Hi Team,

I have used an OOB CRM editable grid where i can add values to certain attributes.

On change, i am validating the value in a cell (say, Amount) and based on certain aggregate conditions , i am showing a grid cell notification. But i also need to prevent save.

I was under the assumption, that setting field notification will prevent the save, but i can verify from the advanced find, that values are still getting updated in the back-end.

Any help is appreciated in this matter.

(Please note that I can't make use of Plugins to through out error, as the validations are like aggregate of the rows in context, and can't throw error for just one record change, if more than one records exists)

*This post is locked for comments

  • Sumit Desai Profile Picture
    Sumit Desai 66 on at
    RE: Editable Grid - Prevent Save if condition fails

    In my case , I'm using editable grid for an associated view in model driven app and on saving confirmation dialog is coming but in the background save operation is happening without considering the confirmation box output response .

    is there way to stop save if user click on cancel button of confirmdialog ?

  • Suggested answer
    M.Azwar Alam Profile Picture
    M.Azwar Alam on at
    RE: Editable Grid - Prevent Save if condition fails

    You can try following link as well

    beringer.net/.../dynamics-365-customizing-editable-grids

    Mark as verified

  • Suggested answer
    M.Azwar Alam Profile Picture
    M.Azwar Alam on at
    RE: Editable Grid - Prevent Save if condition fails

    Hi,

    You can try following link in which Editable Grid have the OnSave event

    https://msdn.microsoft.com/en-us/library/mt788311.aspx

    Mark answer as verified, if it works for you

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Editable Grid - Prevent Save if condition fails

    Hi,

    I am in the same situation, I need to prevent save function in the editable grid based on the validation. . Have you figured it out hot to prevent

    Thanks in Advance

    -Mamallan

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Editable Grid - Prevent Save if condition fails

    Don't get you.

    On change, i am validating the value in a cell (say, Amount) and based on certain aggregate conditions , i am showing a grid cell notification. But i also need to prevent save.

  • Aamir Nawaz Profile Picture
    Aamir Nawaz 35 on at
    RE: Editable Grid - Prevent Save if condition fails

    I think you misunderstood the requirement. I am not talking about preventing save on form but on the editable grid record change

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Editable Grid - Prevent Save if condition fails

    Try sync workflow?

    Not sure how complicated is your aggregation, but simple one I guess should be ok.

  • Nitin Meria Profile Picture
    Nitin Meria 216 on at
    RE: Editable Grid - Prevent Save if condition fails

    Hi Aamir,

    Have you tried this :

    https://neilparkhurst.com/2015/11/11/javascript-prevent-save/

    [View:https://neilparkhurst.com/2015/11/11/javascript-prevent-save/:750:50]

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans