Solved

action prepare invoice Error: An error occurred during processing of the field Project/Contract value PR00000006 Error: Project/Contract 'PR00000006' cannot be found in the system. Please verify whether you have proper access rights to this object.

  • 2 August 2021
  • 3 replies
  • 49 views

i need help for this bug action prepare invoice in Shipment Screen (SO302000)

in Shipment Screen, Project Field and Project Task Field is customize.
this is source code for Project and project task

 protected void SOShipment_RowPersisting(PXCache cache, PXRowPersistingEventArgs e, PXRowPersisting InvokeBaseHandler)
{
if(InvokeBaseHandler != null)
InvokeBaseHandler(cache, e);
var row = (SOShipment)e.Row;
if (row == null) return;
//if((e.Operation & PXDBOperation.Command )== PXDBOperation.Insert)
//{
var rowExt = PXCache<SOShipment>.GetExtension<SOShipmentExt>(row);

SOOrderShipment shipOrder = PXSelect<SOOrderShipment,
Where<SOOrderShipment.shipmentNbr, Equal<Required<SOOrderShipment.shipmentNbr>>>>
.Select(this.Base, row.ShipmentNbr);

if(shipOrder != null ){
SOOrder order = PXSelect<SOOrder,
Where<SOOrder.orderNbr, Equal<Required<SOOrder.orderNbr>>>>
.Select(this.Base, shipOrder.OrderNbr);

if(order != null ){

SOLine line = PXSelect<SOLine,
Where<SOLine.orderNbr, Equal<Required<SOLine.orderNbr>>>>
.Select(this.Base, order.OrderNbr);

PMProject prj = PXSelect<PMProject,
Where<PMProject.contractID, Equal<Required<PMProject.contractID>>>>
.Select(this.Base, order.ProjectID);
if(prj.ContractCD != null){
rowExt.UsrzProjectNumb = prj.ContractCD;
}

if(line.TaskID != null && prj.ContractID != null ){
PMTask task = PXSelect<PMTask,
Where<PMTask.projectID, Equal<Required<PMTask.projectID>>,
And<PMTask.taskID, Equal<Required<PMTask.taskID>>>>>
.Select(this.Base, prj.ContractID, line.TaskID);
if(task.TaskCD != null){
rowExt.UsrzProjectTask = task.TaskCD;
}
}
}
}

//}

}

anyone know how to solved this bug ? thanks

icon

Best answer by Naveen B 2 August 2021, 18:40

View original

3 replies

Userlevel 7
Badge +9

Hi @yanuaralfianus37 Can you please clarify the below points

  • Both Project ID and Project Tasks fields are TEXT fields?
  • Project ID is Active Status or Completed or etc.

Hi @Naveen B, thanks for reply.

  • Both Project ID and Project Tasks fields are TEXT fields? “yes that field is string”
  • Project ID is Active Status or Completed or etc. “ you right, im forget to change customer in Project Screen. that’s why i got that bug because customer in project screen is not same with Shipment screen and Sales Order Screen.
Userlevel 7
Badge +9

@yanuaralfianus37 Great :) Thanks for the update.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2020  Acumatica, Inc. All rights reserved