Hello,
I have a question about powerscript usage. I would like to define several structures in the same place (eg. same file) and use them outside of the defining file, so I am doing something like the following in the source code n_cst_api_supplies:
forward
global type n_cst_api_supplies from n_cst_api
end type
global type st_supply from structure
end type
global type st_process_doc from structure
end type
global type st_product_ref from structure
end type
global type st_legal_entity_ref from structure
end type
global type st_user_ref from structure
end type
end forward
global type st_supply from structure
string guid
string commercial_code
string commercial_denomination
string main_origin
st_product_ref product
st_legal_entity_ref legal_entity
st_user_ref monitored_by
st_process_doc supply_process_docs[]
end type
global type st_process_doc from structure
string name
string value
end type
global type st_product_ref from structure
string guid
string code
end type
global type st_legal_entity_ref from structure
string guid
string code
end type
global type st_user_ref from structure
string guid
string name
end type
global type n_cst_api_supplies from n_cst_api
end type
... rest of the functions/events of n_cst_api_supplies follow
But when I try to define a variable of type st_supply outside of this context (in another custom class), compiler gives me error.
Can I make this work or do I have to define each structure in its own file/structure object?