KarenKaren Member Posts: 79
Is it possible to change the property DeleteAllowed in C/AL Code?
When a value is entered in the heading, the lines in my subform may not be deleted anymore


  • Options
    jhoekjhoek Member Posts: 216
    No, but you can write code to a. make the subform non-editable, or b. (more specifically) prevent users from deleting records in the subform. You may want to use the OnDeleteRecord trigger, or (preferably; if the application allows it) handle this at table level.
    Kind regards,

    Jan Hoek
    Product Developer
    Mprise Products B.V.
  • Options
    KarenKaren Member Posts: 79
    I already used EDITABLE (Form level)

    IF veldA = '' THEN

    I can't modify the line that's ok but I still can delete a line in my subform
  • Options
    PEzechielsPEzechiels Member Posts: 83
    You can write a function to check if there is a value in your heading.
    If the return value is true then place an error message in the Ondelete trigger in your table.
    Your record will not be deleted
  • Options
    KarenKaren Member Posts: 79

    It works

    \:D/ \:D/ \:D/
Sign In or Register to comment.