Hi experts
I've created BO and script action file below.
ScriptHolder.bo
import AP.Common.GDT as apCommonGDT;
import AP.FO.BusinessPartner.Global;
businessobject ScriptHolder {
element holderID:ID;
element firstname: LANGUAGEINDEPENDENT_ENCRYPTED_EXTENDED_Name; // criteria for searching
action testAction;
action deleteRows;
node SearchResult [0,n] {
element resultId:ID;
association ToCustomer to Customer;
}
}
Action-testAction.absl
import ABSL;
import AP.FO.BusinessPartner.Global;
var v_result : elementsof this.SearchResult;
var CustomerQry = Customer.QueryByIdentification;
var CustomerRes = CustomerQry.Execute( );
var cust : Customer;
var i = 0;
foreach(cust in CustomerRes){
v_result.Clear();
v_result.resultId = i;
i = i+1;
//v_result.ToCustomer = cust ====>> I can not assign what I have gotten from query to ToCustomer association
this.SearchResult.Create( v_result );
}
Any suggestion ?
Best Regards,
Krit R.