0

Create un subtable record from the parent table with a script button

Hi,

Need help...

How can i do that please ? 

Thanks !

4 replies

null
    • Direction
    • 6 yrs ago
    • Reported - view

    .... and index the subtable record to the parent table.

    • Nick
    • 6 yrs ago
    • Reported - view

    let myID := Id;
    let NN := (create 'Invoice Items');
    NN.(Invoice := myID);
    let myRN := number(NN.Id);
    popupRecord(record('Invoice Items',myRN))

     

    Change table and field names as reuired from your model.

     

    Nick

    • Direction
    • 6 yrs ago
    • Reported - view

    Thank You Nick. Work fine.

    • C_Data.1
    • 4 yrs ago
    • Reported - view

    let xCurrRec := Id;
    let xTmplt := 'Copy from Sales';
    for i in select Sales where Id = xTmplt do
     for j in select 'Sales Detail' where 'Sales Order' = i do
      let x := (create 'Purchase Detail');
      x.('Ref Nr' := j.'Ref Nr.');
      x.(PZN := j.PZN);
      x.(Ean1 := j.Ean1);
      x.(Ean2 := j.Ean2);
      x.(Ean3 := j.Ean3);
      x.(Brand := j.Brand);
      x.(Name := j.Name);
      x.('6%vat' := j.'6%Vat');
      x.('21%vat' := j.'21%Vat');
      x.('%vat' := j.'%vat');
      x.(Sales := j.'Sales Order');
      x.('Box Qty' := j.Pack);
      x.('Purchase Price' := j.'Purchase Price');
      x.(Qty := j.Qty);
      x.('Purchase Price' := j.'Purchase Price');
      x.(Client := i.Customer.Client);
      x.('Purchase Order' := xCurrRec)
     end
    end

Content aside

  • 4 yrs agoLast active
  • 4Replies
  • 1936Views