I´m trying to use the PROTECT Action to protect BO:s, that have been printed out, from modification.
The BO:s are information for invoicing, so it would not be good to alter them after they have been printed out for that purpose.
I have a process that checks if a BO is ready for invoicing and if it is, it marks it and prints it. But now I also want to protect it.
However, when I put in the PROTECT action the process stops to work and the BO:s doesn´t get marked (and not protected).
Is this not what the PROTECT is for or do I do something else wrong?
/Rem
PROTECT a BO?
-
- Posts: 304
- Joined: Fri Jun 22, 2007 8:26 pm
Rem,
Without a clear picture of you app I would say that you need to have an attribute showing that the invoice has been printed such as Invoice.InvoicePrinted='Yes' or whatever you choose.
From there you can evaluate that attriute in a rule or process and apply the PROTECT You can find a sample of that in the Odering sample application in the Purchase Order OB
Good luck
Chris
Without a clear picture of you app I would say that you need to have an attribute showing that the invoice has been printed such as Invoice.InvoicePrinted='Yes' or whatever you choose.
From there you can evaluate that attriute in a rule or process and apply the PROTECT You can find a sample of that in the Odering sample application in the Purchase Order OB
Good luck
Chris
Yes, that is exactly how I do it. (I.E. changing a -1 value to a positive one so I can keep track)
So when I mark the invoice as printed it works fine, it looks like this:
FIND Jobb WHERE Jobb.Slutfort='Yes' AND Jobb.Fakturabatch=-1
...
Jobb.Fakturabatch=SystemSettings.Aktuellt_fakturabatchnr
SystemSettings.Aktuellt_fakturabatchnr=SystemSettings.Aktuellt_fakturabatchnr+1
But if I put in the line (at the dots): PROTECT Jobb FROM ALL
it doesn´t work any more.
/Rem
So when I mark the invoice as printed it works fine, it looks like this:
FIND Jobb WHERE Jobb.Slutfort='Yes' AND Jobb.Fakturabatch=-1
...
Jobb.Fakturabatch=SystemSettings.Aktuellt_fakturabatchnr
SystemSettings.Aktuellt_fakturabatchnr=SystemSettings.Aktuellt_fakturabatchnr+1
But if I put in the line (at the dots): PROTECT Jobb FROM ALL
it doesn´t work any more.
/Rem
-
- Posts: 304
- Joined: Fri Jun 22, 2007 8:26 pm
-
- Posts: 304
- Joined: Fri Jun 22, 2007 8:26 pm
Well, this Awareway of thinking really takes some time to get used to!
Thanks, it worked! Had yo use the "except SYSTEM" otherwise my routine for flaging the BO:s stoped to work and that I don´t understand. I did like you said, I put in a rule that is on the form for the BO. When my process for flaging starts it doesn´t use that form in any why..
But, anyhow it works and thats the main thing!
Thanks again and a happy new year to all of you!!
/Rem
Thanks, it worked! Had yo use the "except SYSTEM" otherwise my routine for flaging the BO:s stoped to work and that I don´t understand. I did like you said, I put in a rule that is on the form for the BO. When my process for flaging starts it doesn´t use that form in any why..
But, anyhow it works and thats the main thing!
Thanks again and a happy new year to all of you!!
/Rem
-
- Posts: 304
- Joined: Fri Jun 22, 2007 8:26 pm
Snippet from the User Guide......
By default protection applies not only to changes done via the user interface, but
also to changes done by a process. It is possible to distinguish between these two
situations by specifying System as the access level, for example:
If Account.STATE <> ’NEW’ THEN PROTECT Account.Balance FROM ALL
EXCEPT System
In this case users will not be able to change the account balance when the state of the
account is not new, however, it is possible to configure the process rules that change the
account balance.
Hope that helps
By default protection applies not only to changes done via the user interface, but
also to changes done by a process. It is possible to distinguish between these two
situations by specifying System as the access level, for example:
If Account.STATE <> ’NEW’ THEN PROTECT Account.Balance FROM ALL
EXCEPT System
In this case users will not be able to change the account balance when the state of the
account is not new, however, it is possible to configure the process rules that change the
account balance.
Hope that helps