I'm try to create Receipt entry with reference P/O by .net api coding.
but there are error occurring "Incorrect procedure. Operation requires post access." when command PORCP1detail1.Update()
Then i try to test with single P/O but still error. See code as below>>>
PORCP1header.Order = 0
PORCP1header.Fields.FieldByName("RCPHSEQ").SetValue("0", False)
PORCP1header.Init()
PORCP1header.Order = 1
temp = PORCP1detail1.Exists
PORCP1detail1.RecordClear()
PORCP1detail3.RecordClear()
temp = PORCP1detail4.Exists
PORCP1detail4.RecordClear()
PORCP1detail6.Init()
PORCP1detail2.Init()
PORCP1header.Fields.FieldByName("VDCODE").SetValue(pReceiveFinal.VDCODE, True)
PORCP1header.Fields.FieldByName("PROCESSCMD").SetValue("1", False)
PORCP1header.Fields.FieldByName("PONUMBER").SetValue("PO16011079", True)
PORCP1header.Order = 0
PORCP1detail5.Fields.FieldByName("LOADPORNUM").SetValue("PO16011079", True) ' Purchase Order Number
PORCP1detail5.Fields.FieldByName("FUNCTION").SetValue("4", False)
PORCP1detail5.Process()
PORCP1header.Order = 1
PORCP1detail3.Fields.FieldByName("PROCESSCMD").SetValue("1", False)
PORCP1detail3.Process()
PORCP1detail1.Fields.FieldByName("RCPLREV").SetValue(3, False)
PORCP1detail1.Read(False)
PORCP1detail1.Fields.FieldByName("RQRECEIVED").SetValue(1, True)
PORCP1detail1.Update() //// Error this line ("Incorrect procedure. Operation requires post access.")
PORCP1detail5.Fields.FieldByName("FUNCTION").SetValue("10", True)
PORCP1detail5.Process()
PORCP1header.Insert()
PORCP1header.Init()
PORCP1header.Order = 0
Can anyone help me or give an example?
Thank you so much.
Nice.
but there are error occurring "Incorrect procedure. Operation requires post access." when command PORCP1detail1.Update()
Then i try to test with single P/O but still error. See code as below>>>
PORCP1header.Order = 0
PORCP1header.Fields.FieldByName("RCPHSEQ").SetValue("0", False)
PORCP1header.Init()
PORCP1header.Order = 1
temp = PORCP1detail1.Exists
PORCP1detail1.RecordClear()
PORCP1detail3.RecordClear()
temp = PORCP1detail4.Exists
PORCP1detail4.RecordClear()
PORCP1detail6.Init()
PORCP1detail2.Init()
PORCP1header.Fields.FieldByName("VDCODE").SetValue(pReceiveFinal.VDCODE, True)
PORCP1header.Fields.FieldByName("PROCESSCMD").SetValue("1", False)
PORCP1header.Fields.FieldByName("PONUMBER").SetValue("PO16011079", True)
PORCP1header.Order = 0
PORCP1detail5.Fields.FieldByName("LOADPORNUM").SetValue("PO16011079", True) ' Purchase Order Number
PORCP1detail5.Fields.FieldByName("FUNCTION").SetValue("4", False)
PORCP1detail5.Process()
PORCP1header.Order = 1
PORCP1detail3.Fields.FieldByName("PROCESSCMD").SetValue("1", False)
PORCP1detail3.Process()
PORCP1detail1.Fields.FieldByName("RCPLREV").SetValue(3, False)
PORCP1detail1.Read(False)
PORCP1detail1.Fields.FieldByName("RQRECEIVED").SetValue(1, True)
PORCP1detail1.Update() //// Error this line ("Incorrect procedure. Operation requires post access.")
PORCP1detail5.Fields.FieldByName("FUNCTION").SetValue("10", True)
PORCP1detail5.Process()
PORCP1header.Insert()
PORCP1header.Init()
PORCP1header.Order = 0
Can anyone help me or give an example?
Thank you so much.
Nice.