Jump to content

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

Recommended Posts

Posted

I'm not sure if this is the right place to post this, but if I knew the answer, I would probably know where to post :crazy2:

I have a script that has about 150 steps that ultimately posts a work order and creates a related invoice. There are many scripts that create invoices, all with Show All Records/Show Omitted Only/New Record-Request then goes on to add the new InvoiceID to a variable then creates the related line items.

All the scripts work fine except for one. Anytime I'm managing fields in the Invoice table (I don't know if I may be editing a field or even possible working in the ERD) the New Record/Request step gets skipped and the script goes on to create the line items. The serial number of the key field doesn't increment.

There are about 50+ scripts that add records to various key tables in the same way and again, multiple scripts that add records to this table, but the problem only seems to occur with this one script and the one table. I have a developer layout for the table so I may also always have been on the same layout, but I don't know for sure.

I don't remember FM locking a table while working on it. I'm going to trap for an error message now but I'm not sure that will really answer my question.

Is anyone aware of this type of action and how to work around it (other than not working on the database while live - that's unavoidable)?

Thanks!

Posted (edited)

Oh, yes, you lock a table when you are working on it Manage Database (esp if it has an auto entered serial field) ! I ran into this big time (which is why you shouldn't develop on a live system).

So, New Record will fail. You could loop around New Record step...

Edited by Guest
Posted

Sometimes it is unavoidable to develop live - I have to, but thanks for pointing out what happens when you do, and it seems quite sensible too. I suppose some scripted steps should always be error trapped, particularly New and Duplicate.

Posted (edited)

Thanks for the scoop. I seem to remember discussions about table locking years ago but don't remember any other details about it. I've always worked on the premise that adding records was benign unless there was corruption in the serial number Key Field.

Edited by Guest
Posted

Geoff Coffey enlightened me on this in a TechNet post. Basically, FM locks the table if you are modifying a table w/ an autoenter, bcs it "holds" the next serialID.

This topic is 5505 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.