Skip to Content
0

How to insert record into CustomBO?

Apr 06, 2017 at 07:58 PM

163

avatar image

Hi,

How can I insert record into CustomBO. I am trying to filter some of the address data from customer and display it on Ticket screen. Created a CustomBO to store the data, but not able to insert the record into CustomBO.

var saddresses: collectionof CustomBO;

foreach (var curaddress in addresslist) { // this is standard object. Reading data on //AfterLoading event

var saddr: elementsof CustomBO;

saddr.FE_SRV_ADDR_formattedDesc = curaddress.<value>;

saddr.FE_SRV_ADDR_Street = curaddress.<value>;

saddresses.add(saddr); // this is giving syntax error. How can I add this record to BO ?QueryResult.add(saddresses);

}

There is no create method on CustomBO. I noticed CustomBO.create() method in some of the posts. how to define create method?

Thank you & Regards,

Praveen

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Edmund Chua Apr 07, 2017 at 09:51 AM
0

Hi Praveen,

If you are calling your code from Ticket, then define your CustomBO as below so that they are in the same deployment unit.

[DeploymentUnit(CustomerRelationshipManagement)] businessobject CustomBO { .....}

You will then be able to see the Create() option.

Thanks

Edmund

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thank you Edmund.

0
Senthil Murugan Apr 07, 2017 at 04:17 AM
0

Hi Praveen,

If you couldn't find the create() method in your customBO, then possibly the standard object where you create the custom bo instances and your CustomBO are in different deployment unit

Include the DeploymentUnit of your standard object to the customBO and

Try the below,

var saddr: elementsof CustomBO;foreach (var curaddress in addresslist) { 
eventsaddr.FE_SRV_ADDR_formattedDesc = curaddress.<value>;
saddr.FE_SRV_ADDR_Street = curaddress.<value>;
CustomBO.Create(saddr);
}

Regards,

Senthil

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thank you Senthil.

0