Passing Sales Order Number to UD Field in Job Head

Hi

We have a custom dashboard that allows us to pass information to the Quick Job Screen. So when we press ‘New Quick Job’ the ‘New Quick Job’ panel slides out and when you press ‘Next Job’ the next Job number field is populated along with selected part number from the dashboard.

This all works fine and is handled by an onlclick event and an event to update the row.

I would also like to populate the quantity field and a custom sales order number field. All the information is being passed but not displayed. I think this has to be populated after the QuickJobChangePartNum service has run as anything you populate before disappears once this has run.

This is the data that is being passed from the dashboard

{
	"type": "Ice.Lib.Framework.LaunchFormOptions",
	"options": {
		"valueIn": {
			"PartNum": "{SalesPlanningV1_1_0.PartMtl_PartNum}",
			"RevisionNum": "{SalesPlanningV1_1_0.PartMtl_RevisionNum}",
			"Quantity": "{PMSalesPlanningV1_1_0.Calculated_JobQty}",
			"SalesOrderNum": "{SalesPlanningV1_1_0.OrderHed_OrderNum}"
		},
		"showAsModal": false
	}
}

Does anyone know how I can achieve this?

I’m assuming this means you’ve already customized the Quick Job Entry form, correct? Because you added a textbox there for your SalesOrderNum? What are you binding that value to?

Do you have an event there to “receive” the passed valueIn(s) and set the values to the corresponding target columns via row-update?

Yes, we have a customised New Quick Job Form with an order number text field. I have bound the object to a custom data view. (I am not sure about this at all, but this is based on what have read).

There is then an event that triggers on GetNewQuickJobAfter that updates the part number field.

So, I would try adding additional rows to the row update that updates:

QuickJob.Quantity

with a value of (JSON):
“%session.context.initialValueIn.ValueIn.options.valueIn[2]%”

And another for:

YourDataView.SalesOrderNum

with a value of (JSON): “%session.context.initialValueIn.ValueIn.options.valueIn[3]%”

See if that populates those columns.

Like you mentioned, you MAY need an event with a different trigger to update those columns slightly later instead, if those values get wiped after the QuickJobChangePartNum service runs.