Can not load data from another entity

I want to load feed one entity with another e.g. Insert records in deliveryOrderLine from SalesOrderLine to start with. However, I can’t execute the application as having error and doesn’t show Edit UI

Not sure where did I make a mistake, thanks for your help.


    private CollectionDatasource<SalesOrder, UUID> salesOrdersDs;

    private CollectionDatasource<SalesOrderLine, UUID> salesOrderLinesDs;

    private CollectionDatasource<DeliveryOrderLine, UUID> deliveryOrderLineDs;
    private PickerField salesOrder;

    private DataManager dataManager;

    private Metadata metadata;
    public void init(Map<String, Object> params) {

        salesOrder.addValueChangeListener(e -> {

            for(SalesOrderLine line : salesOrderLinesDs.getItems()){
                DeliveryOrderLine line1 = metadata.create(DeliveryOrderLine.class);



Hi Mortoza,
We will be able to help you if you send us a small sample project along with reproduction scenario that demonstrates the issue.

It worked when i repainted: