Hi,
I have created a BO in Cloud Application Studio with the following structure:
import AP.Common.GDT as apCommonGDT;
import AP.SupplierInvoicing.Global as SupplierInvoice;
[DeploymentUnit(SupplierInvoicing)] businessobject ZSupplierInvoiceProtocolRenumbering {
[AlternativeKey] element invoiceID: BusinessTransactionDocumentID;
[Label ("Starting date")] element startingDate: Date;
[Label ("Ending date")] element endingDate: Date;
node Information [0, n] {
[Label ("Invoice number")] element invoiceId: BusinessTransactionDocumentID;
[Label ("Protocol Number")] element protocolNumberOne: BusinessTransactionDocumentID;
[Label ("Invoice date")] element invoiceDate: Date;
[Label ("Receipt date")] element receiptDate: Date;
element systemID: UUID;
}
association ToSupplierInvoice to SupplierInvoice using UUID;
action ExtractInfo;
action EditProtocolNumber;
}
The ExtractInfo action looks like this:
import ABSL;
import AP.SupplierInvoicing.Global;
if (!this.startingDate.IsInitial() && !this.endingDate.IsInitial()) {
var query = SupplierInvoice.QueryByElements;
var selectionParams = query.CreateSelectionParams();
selectionParams.Add(query.Date, "I", "BT", this.startingDate, this.endingDate);
var resultData = query.ExecuteDataOnly(selectionParams);
if (resultData.Count() > 0) {
foreach (var result in resultData) {
var type = result.ztaxtype;
if (result.ztaxtype == "09") {
var InformationData : elementsof ZSupplierInvoiceProtocolRenumbering.Information;
InformationData.invoiceId = result.ID.RemoveLeadingZeros();
InformationData.invoiceDate = result.Date;
InformationData.receiptDate = result.ReceiptDate;
InformationData.protocolNumberOne = result.ZtaxDocNumber;
InformationData.systemID = result.UUID;
this.Information.Create(InformationData);
}
}
}
var stop = 1;
}
In the UI designer I have made the following binding for ExtractInfo action:

In the front-end the screen looks like this:

My goal is when I hit the Edit button to trigger the action EditProtocolNumber, to fetch the data from the selected row and to load the data in the next screen which looks loke this:

Is this possible?
As I am quite new in the Cloud Application Studio coding I would appreciate every tip in order to achieve the goal I have set myself.