I am starting to make use of functions and have come across an very strange issue. I have a function that updates a UD column on JobOper table. When I run the function using Postman no errors are reported however the UD column is not updated !?!?
Some details… the function takes in JobNum, AsmSeq and OprSeq. I have used a code widget to pull a JobEntry dataSet with GetByID, edit the UD field (called OpComp_c) and then call Update to save the changes. For debugging I set the function to return the dataset returned from the Update call. There are no errors showing up and the returned dataset has the update in it, however when I look in the database the UD field hasnt changed. I tried doing the same thing with the BO widgets and a set field by query widget and get the same result.
I have also checked I am looking at the same job in the same system as I have done that before
Updating the code as below now results in an error of “Cannot manually update the Production Labor Rate in JobOper.” even though the ProdLabRate is not being changed…
So I think I have figured this one out. I ended up changing my approach to call the JobEntry Rest api instead of doing it in a function but had the same issue. I was able to fix it by calling UpdateExt instead of Update. I expect if I called UpdateExt in the function that would fix the function - I haven’t tested this however.