Skip to Content
0
Jun 28, 2016 at 11:31 AM

Expense Report Mileage Collection: 'CreateWithTemplate'

40 Views

Hi all,

I'm working on uploading expense reports using a combination of an XML input run and some scripting and have come across an issue. The Mileage collection of the ExpenseReport BO is 1..n, but there's no Create() method. There's a CreateWithTemplate() method, but I'm not sure how to use it. At first I tried to bypass this by just going newExpenseReport.Mileage.GetFirst() and accessing elements that way, but when an expense report instance is first created the Mileage collection doesn't have any instances in. So what I need to do is figure out how to add one or more instances to this collection: you can do it in the front end when creating an expense report by going into 'Add more mileage information', so logically it should be possible in scripting as well. Anyone had any experience with this?

Thanks,

Lewis