Project and Task is empty / "X" value in Issue Screen
I have problem with project and task in Issue screen (IN302000), after doing UPDATE IN from Shipments Screen (SO302000), automatic make a new Issue in Issue screen (IN302000) but project and task is not same with project and task in Shipments Screen (SO302000).
(project and task field is custom and just calling data)
how to solve that case ? thanks.
Page 1 / 1
Awesome...I'm just fetching the Project ID from Sales Order and then updated in the Issues screen line level.
hi @Naveen B thanks for the code! yeah, It’s work ! im adding “row?.SOOrderNbr” and “graph.transactions.Cache.Update(row);”.
this is result that logic
Hi @yanuaralfianus37 , I have written the below code here it self, but NOT verified. But it will work, please verify..
PXGraph.InstanceCreated.AddHandler<INIssueEntry>(graph => { graph.RowInserted.AddHandler<INTran>((cache, e) => { var row = (INTran)e.Row; if (row == null) return;
SOOrder order = PXSelect<SOOrder, Where<SOOrder.orderNbr, Equal<Required<SOOrder.orderNbr>>, And<SOOrder.orderNbr, Equal<Required<SOOrder.orderNbr>>>>>.Select(soOrderGraph, row?.SOOrde, row?.SOOrderNbr);
after im press the button “UpdateIN”, i get error “Unable to cast object of type 'PX.Objects.IN.INTran' to type 'PX.Objects.IN.INRegister'.“
@yanuaralfianus37 In the INUpdate” action, you need to implement logic to get the Project ID from Sales Order screen and assign that to INTran record in the Issues screen. That way the project will be populated in the Issues instead of taking the default project i.e. X
thanks for the code @Naveen B! but the way, do you know how to assign project ID value from Sales Order Screen (SO301000) to Project ID value in Issue screen (IN302000) ? i don’t know how project ID in Issue screen (IN302000) get a value “X”.
this is my SS Sales Order Screen (SO301000)
Here is the code to override the UpdateIN action in Shipments screen.
public class KNPWSOShipmentEntryExt : PXGraphExtension<SOShipmentEntry> { public PXAction<SOShipment> UpdateIN; [PXUIField(DisplayName = "Update IN", Visible = false, MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)] [PXButton] protected IEnumerable updateIN(PXAdapter adapter, List<SOShipment> shipmentList = null) { PXGraph.InstanceCreated.AddHandler<INIssueEntry>(graph => { graph.RowInserted.AddHandler<INTran>((cache, e) => { // add the logic related to project details });
}); return Base.UpdateIN.Press(adapter); } }
Hi @Naveen B thanks for reply. do you have a example script how to assign values to the Issues screen line level from override action UPDATE IN?
Hi @yanuaralfianus37 I’m assuming that Project ID and Task fields are customized fields in Shipments screen.
If yes, standard Acumatica “Update IN” action process, will NOT consider the customization fields and create IN Issue.
If this is the case, you need to override the “Update IN” action to take the project id and task values from Shipments screens and assign these values at the Issues screen line level.
Also, in the “Prepare Invoice” action, you need to do the same process.