cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in updating Production Order

Former Member

Dear All,

When I try to update the Production Order I am getting the error message as "Invalid user OWOR.UserSign ".

Help me to resolve this problem.

Thanks,

Lingam.

Edited by: miplkutalingam on Feb 13, 2012 3:22 PM

jeff_putnam
Explorer
0 Kudos

I know this is an old post, but I'm having the same problem updating a PdO I just created from Planned to Released. I set up the PdO and PdO lines (not shown) and the Add completes successfully. It is in Planned state and has a valid user of 'cnc' (ID 64) and it all looks accurate. Later I added the update code and get "Invalid user <OWOR.UserSign>". I took Gordon's suggestion and the query returns User Signature 64 which is correct and valid. I'm using SAP 8.82. Any help would be appreciated.

            // Finally, add the PdO to SAP
            int iResult = oProdOrder.Add();
            if (iResult != 0)
            {
                MessageBox.Show(mainForm.integra.GetLastErrorDescription());
            }   

            // Update status to released
            oProdOrder.ProductionOrderStatus = BoProductionOrderStatusEnum.boposReleased;
            iResult = oProdOrder.Update();
            if (iResult != 0)
            {
                //Error
                string error = mainForm.integra.GetLastErrorDescription();
                Utils.MsgLog("Error setting status to Released : " + error);
                MessageBox.Show("Error setting status to Released : " + error);
            }
jeff_putnam
Explorer
0 Kudos

I couldn't see any way to edit my last comment, so here's an update. I watched oProdOrder.UserSIgnature from the time I created oProdOrder to the time I updated it to Released and it is zero (0) the whole time. Yet the Add() succeeds, and puts the correct company-connected user ('CNC' - ID 64) in the PdO's User field, while the Update() fails.

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert

Hi putnam.jeff,

Before updating Production Order, first try to retrieve it using GetByKey() method and then try to update.

Hope it helps!

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

jeff_putnam
Explorer
0 Kudos

Thank you, Ankit. That solved the problem.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Dear Lingam,

Welcome you post on the forum.

Something must be wrong in the document. The user who created the PO may be deleted somehow. B1 does not allow the deleting of the user but manual deletion may be occurred in your database.

Try: SELECT UserSign FROM OWOR T0 WHERE T0.DocNum = '[%0\]' to find out.

Thanks,

Gordon

Former Member
0 Kudos

Thanks Gordon.

Yes the problem was with the DB.

And I have tried to update the PO from DI API. I tried it in other DB Connection, it didn't give any error.

Thanks to all,

Lingam.

Former Member
0 Kudos

Hi Lingam......

If it is addon problem then you should make necessary changes and assign diferent User code and try to do......

Regards,

Rahul