Jump to content

This topic is 7352 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

After an invoice has been paid I would like the record to lock so changes can not inadvertently be made to the record without a password that would give them that ability.

I have an [invoice] file where the invoices are written and where the fields are for Check_number, Date_paid and Amount_paid. There is also an Order_status field that shows PAID once the Date_paid field is populated! All product information is in the [Line Items] file.

Please let me know if you need more information.

Thank you,

Bill

Posted

Version 7 has better access control than 6...but anyway, you could have a separate layout (effectively read-only) and require a password to get to the open layout.

Posted

Bill:

Another method (which I use in all my solutions) is to have a script step in all scripts which take you to this sort of layout check for (in your case) "PAID", in which case you are taken to the locked layout. There would also be an administrator's path, to edit if needed.

-Stanley

Posted

Hi guys,

Maybe you could help just a bit more. Is there not a way to somehow lock all records that are marked PAID? But the invoices marked INVOICED would be available for modification? It seems, if I'm reading the two posts correctly with your scripts, they would go to a separate area of locked paid invoices.

I think what I'm after if it's doable is a system where someone comes in under pass code "IKE" and they have full access except they cannot modify invoices marked PAID as they would be locked records. But if you come into the system under pass code "HOG" they would have full access including paid invoices which would be unlocked and modifiable!

In other words, I want whoever is in the system to see all of the records in the same place. It's their pass code that allows them locked or unlocked records based on their pass code!

What do you think?

Bill

Posted

You obviously need to do something with those passwords smile.gif

One thing you can do is add a validation calc to all the fields that shouldn't be modified. The calc would test for paid status and return a false boolean if it is. Whenever someone tries to modify a record that is paid, the validation won't let them save the changes.

Posted

Hi Bill,

The way this is often done is by creating 2 identical layouts, one in which all the fields are locked, and one in which all are open. The locked one would be the default view mode, with an 'edit' button that would run the script;

if status="paid"

show message "This invoice has been paid and cannot be modified

else

go to layout 'edit'

end if

of course, you would want a 'finished editing' button that would return you to the locked layout.

I have yet to look into new ways of doing this via FM 7, and would be curious to know of them.

HTH

-Raz

Posted

Under Access Privileges -> Passwords, you can specify a calculation that determines whether a record can be edited under each password. Something like IsEmpty(Date_Paid) should work for the ones you want to limit.

This topic is 7352 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.