cancel
Showing results for 
Search instead for 
Did you mean: 

Copy CustomBO Instance

0 Kudos
127

Hello experts.

I'm trying to copy an instance of a CustomBO.

What I'm trying to do in ABSL is this:

//Get the instance which I want to copy
var instance = MyBO.Retrieve(UUID);

//Pass the instance to Create function
var create = MyBo.Create(instance)

With this approach I'm getting the following error: Parameter type 'Node(MyBO.Root)' is not valid.

Can anyone help?

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

may_thitsaoo
Contributor
0 Kudos

Hi Marc,

This is some sample code for instance creation.

//Get the instance which I want to copy
var instance = MyBO.Retrieve(UUID);


// define MyBO node
var myBO_element: elementsof MyBO;


// create new instance on MyBO
myBO_element.Field1 = instance.Field1;
myBO_element.Field2 = instance.Field2;
myBO_element.Field3 = instance.Field3;
MyBO.Create(myBO_element);

Hope this helps.

May


0 Kudos

Hello May.

Thanks for your response, this is the way I wanted to avoid because it is a huge BO with more than 100 attributes.

Finally I'm using this method, but I don't like it because it is hard to maintain.