cancel
Showing results for 
Search instead for 
Did you mean: 

Parameter type Node on Custom Reuse Library

0 Kudos

Hello everyone.

I'm trying to pass the instance "this", in this case a CustomerInvoice, to a Function in a Custom Reuse Library we created.

// Validate data of a CustomerInvoice
MyLibrary.Validate(this);

In the Function, we specified the parameter type as CustomerInvoice.CustomerInvoice Node, but when calling it we get the following error: "Parameter type 'Node(CustomerInvgoice.CustomerInvoice)' is not valid.

Screenshot of the function defining

Has anyone found why?

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

jravnik
Participant

Dear Marc,

notice that "ElementsOf" is automatically set within your parameter list, as this is the only supported way of working with "node data" in libaries. You cannot change this, unless you use a normal data type - nothing related to a business object structure.

"ElementsOf" is acting as a structured data type, which resembles the node of the business object, but no sub-nodes. In your case it resembles the CustomerInvoice node of the CustomerInvoice business object. However, as said "ElementsOf" is acting as a data type and is not equal to the "this" object you have in the buffer while in an ABSL script file.

If you want to work with data of the customer invoice node within the library function, you can pass its UUID as a parameter and then use a Retrieve call within the library function.

Best regards
Jürgen

0 Kudos

Hello Jürgen.

Thanks four your response.

I was thinking in the same way, but I thought it's not needed to do a retrieve when you already got the data as this increase the execution time.

Anyway, I will try and move forward.