Order request: edit form
OrderRequest
references three Cooperator
records: requestor
, shipTo
and finalRecipient
. According to the original GG, finalRecipient
is the primary entry and it is used to populate shipTo
and requestor
when creating an order.
The form should automatically populate shipTo
and requestor
with the value selected as finalRecipient
when they are null
.
Please update the OrderRequest form with _hints
:
{
"OrderRequest": {
"id": "Order Request ID",
"id_hint": "order_request_id -- Table's primary key (PK) field auto-generated by GRIN-Global, cannot be edited.",
"originalOrderRequest": "Original Order",
"originalOrderRequest_hint": "original_order_request_id -- Field is blank for all new orders. It refers to the original (or parent) order number when an order is split.",
"localNumber": "Local Number",
"localNumber_hint": "local_number -- Local order numbers only for sites that maintain their own ordering system of numbers - include that number here to cross reference that system with GG. Local order numbers may consist of existing sequences which have historic value or are numbers from a local database.",
"orderedDate": "Ordered Date",
"orderedDate_hint": "ordered_date -- Date when the order is received",
"requestorCooperator": "Requestor",
"requestorCooperator_hint": "requestor_cooperator_id -- The cooperator of the person or organization who requested the germplasm or information. It is automatically copied from the final recipient. Change this field only when an order is requested by a person or organization different from the final recipient.",
"shipToCooperator": "Ship To",
"shipToCooperator_hint": "ship_to_cooperator_id -- The cooperator of the person or organization immediately receiving the order from the site. It is automatically copied from the final recipient. Change this field only when the order is sent to a location different from the final recipient, such as a quarantine location.",
"finalRecipientCooperator": "Final Recipient",
"finalRecipientCooperator_hint": "final_recipient_cooperator_id -- The cooperator of the final recipient of the germplasm.",
"orderObtainedVia": "Order Obtained Via",
"orderObtainedVia_hint": "order_obtained_via -- Requester reference number or invoice to show how the order was obtained.",
"specialInstruction": "Special Instructions",
"specialInstruction_hint": "special_instruction -- Any special instructions pertaining to the order request.",
"webOrderRequest": "Web Order Request",
"webOrderRequest_hint": "web_order_request_id -- Web order request key field that links the order_request record to a web order request record.",
"orderTypeCode": "Order Type",
"orderTypeCode_hint": "order_type_code -- The type of order. Must be a value in the ORDER_REQUEST_TYPE Code Group.",
"intendedUseCode": "Intended Use",
"intendedUseCode_hint": "intended_use_code -- A code indicating the intended use of the material requested. Must be a value in the ORDER_INTENDED_USE Code Group.",
"intendedUseNote": "Intended Use Note",
"intendedUseNote_hint": "intended_use_note -- Any additional notes on the intended use of the material requested.",
"completedDate": "Completed Date",
"completedDate_hint": "completed_date -- Date when the order was completed.",
"feedback": "Feedback"
}
}
API update
@mborodenko create(OrderRequest)
should follow the same logic as described above and must automatically populate shipTo
and requestor
with the value selected as finalRecipient
if they are null
.