Updatable Jobs grid won't save because it needs Audit comment

I am trying to create an updatable grid for users to change a couple things on Jobs and I can’t get it to save because we have auditing turned on and it is asking for a change description. If you go to Engineer and Release a job it needs the Audit change description. I have tried adding the JobAudit to the BAQ with no luck. I can’t get it to take a change description. Any ideas?

image

What fields are you updating? if they are UD fields you can do an advanced update which will bypass the audit requirement.

JobEntry has a method CheckForChanges that determines if the Job audit description needs to be entered. Assuming in a trace of your update you see it you can set a condition that the calling assembly is your baq and then set opChangeDescription to false post processing, so hopefully no audit entry is needed.

They’re not UD fields, I am updating the Engineered and Released fields on the job header. I have to un-release the job so it will allow me to update a couple fields on Job Operations.

Thanks

I have not tried a BAQ, I have entered the Change Description through the JobEntry.Preprocessing method though. Custom Actions on BAQ update ???

If resetting the opChangeDescription does not work you could pre processing on update either unset the jobs released and engineered or unset the company prevent changes and then set it back post update.

Figured it out … It kept saying JobHead ChangeDesription was empty but there is no JobHead.ChangeDescription, at least I didn’t think there was. I tried to add it to the ‘Query to Object Column Mappings’ and it was in there:

Now it works!

I just set it to the user ID which is good enough.

1 Like