In follow example we insert a golden arrow in work order document
If customer click on it, the system open the linked work order
Note: This is only working,
- if the work order is created from "sales order" or "sales order to production order"
- "Collective order", "Merge work order" not supported
global function form_loaded
item.auftrag.detailbitmap=opensalesorder()
end global
global function opensalesorder
// Read from work order position the linked Document
// Note: This is only working for SalesOrder to Production orders.
// Pre Invoice or other base documents not supported in this example
select top 1 "BEAS_FTPOS"."DocEntry" into :ll_docEntry &
from "BEAS_FTPOS" where "BEAS_FTPOS"."BELNR_ID" = <dw_1.item.belnr_id.value,#0> and "BEAS_FTPOS"."DocEntry">0
if <ll_docEntry> n> 0 then
openwindow=fo_Order=<ll_docEntry>
end if
end global