cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to update POR1.AcctCode throught DI

ronnie_scott
Participant
0 Kudos

Hi Experts,

I'm trying to use DI to replace warehouse code on open PO, and at the same time update GL account with the Inventory Account set up for the new warehouse. It let me change the warehouse, which doesn't automatically pick up the new GL account. If I try to set the AcctCode, it gives me the error "POR1.AcctCode Field cannot be updated." Yet I'm able to change the GL account in B1 UI by changing the warehouse, even though the GL account field itself is not editable in UI. Am I missing something in order to change AcctCode on open PO lines?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello,

It seems that this is a bug of the DI. I think this is related only with the POR1.

I faced the same problem using DI version 8.82.

I solved this by executing an update in the document object, right after adding the document, like this:


document.Add();

//this is my code to get the docEntry of the document that I just added

int docEntry = Convert.ToInt32(Helper.ConnectionHelper.Instance.Company.GetNewObjectKey());

document.GetByKey(docEntry);

document.Lines.AccountCode = "4.4.30.1.11";

document.Update();

Regards,

William Wachholz

Eneveux
Product and Topic Expert
Product and Topic Expert
0 Kudos

Ronnie,

The attached link to SAP Note 1295829 details a similar issue after upgrading to SAP Business One 2007A from an earlier version. You may want to review and see if this issue is similar. If it is the note states that you will need to contact SAP Support.

https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=...

Eddy

ronnie_scott
Participant
0 Kudos

Eddy,

The note you referred to is not relevant to what I'm trying to do. I'm not trying to update Business Partner. I'm trying to change the GL account designation on open PO's. The symptom mentioned in the note is unable to update BP. I have no problem updating in BP Master. Just for the sake of trying, I run the queries suggested in the note and did not get any results.