Modify Permissions

I have to write some logic which modifies some normally protected ledger tables. I’ve been told there is a way to temporarily alter permissions on an object to allow for modifcations. Anyone have a bit of sample code on how to do this? Thanks in advance.

Take a look at the [report/form/…]properties, property “Permissions”.

If you give an indirect rm (read, modify) permission to your user (within one if the roles it’s using) to the table, and if you give your object the rm permission to this table, it will do the trick. We don’t have to remind you to be really careful if you want to modify the ledgers…

Thanks for the responses. I got it to work. And yes, thanks for the warning. I am being very careful with the ledgers!

As a suggestion, always use a CodeUnit to modify “protected tables” and call it from the Form/Report. If you assign permissions and modify from the Form/Report the user won’t be able to modify it (add a column, …) with the basic design tools (the object will have permission that he can’t assign). Hope that helps, Jesús Soage