Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

how to limit the record insertion in a table

Posted on by 210

I have three forms Book Trans, BookTable and student table. I want to insert five transactions in the BookTransaction form with the same student id(field in student table) and stop when it triggers the sixth time.

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: how to limit the record insertion in a table

    Do you still have some open question?

    You wrote "I have three forms Book Trans, BookTable and student table. I want to insert five transactions in the BookTransaction form with the same student id(field in student table) and stop when it triggers the sixth time."

    and

    "I want to insert 5 record with one Studentid,more than that it should throw error.

    And there are 4 student id"

    It doesn't seem consistent.

    If you have some question, please explain the process and expected outcome. Thanks!

  • vikash_ Profile Picture
    vikash_ 210 on at
    RE: how to limit the record insertion in a table

    Thank you for reverting back,

    I want to insert 5 record with one Studentid,more than that it should throw error.
    And there are 4 student id

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: how to limit the record insertion in a table

    Add check in validateWrite method, calculate existing records and return false if there are already five records.

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans