Control for deleting Notes

snyktpsnyktp Member Posts: 75
Hi All,

I dont want to users to delete Notes on RTC. Is there any way to delimit for deleting code on Notes factbox?

Thank you

Comments

  • SavatageSavatage Member Posts: 7,142
  • snyktpsnyktp Member Posts: 75
    but there isnt a page for Notes , it is a system factbox.
  • snyktpsnyktp Member Posts: 75
    Hi,

    Do you have any idea?

    Thank you
  • SavatageSavatage Member Posts: 7,142
    Nope. I don;t use factboxes - but typically I would find the place where notes are stored and set deleteallowed to no.

    Don't factboxes just show data that already exists in another table.
    You can stop it there from being deleted. that would be my first move.:-k
  • snyktpsnyktp Member Posts: 75
    I know record links table stores note/link data. Sales Orders/ Sales quotes have Notes factbox, i dont want to use another page for this. There must be a way to limit for deleting note . #-o
  • ufukufuk Member Posts: 514
    snyktp wrote:
    I know record links table stores note/link data. Sales Orders/ Sales quotes have Notes factbox, i dont want to use another page for this. There must be a way to limit for deleting note . #-o

    You can write your deletion control code on OnDelete trigger of the Record Link table. Alternative method is using permissions.
    Are there any concerns with these methods?
    Ufuk Asci
    Pargesoft
  • snyktpsnyktp Member Posts: 75
    Hi Ufuk,

    Codes are already there :) but it doesnt work.

    I dont want users to detele notes on sales order & sales quote but they can delete notes from customer & item. It means it is not logic to limit permission for table. There must be something to limit notes on some pages.

    Is this clear?

    thank you
  • ufukufuk Member Posts: 514
    Hi,
    I think there is a problem with your code. Check the following code. It works for me:
    IF Type = Type::Note THEN BEGIN
      RecRef.GET("Record ID");
      IF RecRef.NUMBER IN [DATABASE::"Sales Header",DATABASE::"Purchase Header"] THEN //whatever table you want
        ERROR('');
    END;
    
    Ufuk Asci
    Pargesoft
Sign In or Register to comment.