I’m having difficulty figuring out where to add code to copy the values of some FSContDt UD fields to FSRenewalDt UD fields. Plus I’ll want to copy those UD fields from FSRenewalDt to another FSRenewalDt record on a 2nd renewal (and so on). This seems like a much more difficult thing than the first renewal. I’ve tried code in Erp.BO.ServiceContract.GenerateRenewal preprocessing, but it told me FSContDt was empty there. I’ve tried code in Erp.BO.ServiceContract.GenerateRenewalLines preprocessing, which doesn’t throw an error, but doesn’t work either. Plus I don’t know how to reference the previous renewal line from there.
I know how I’d do it in Java or something like that where I could read the data into arrays and match them up that way, but I don’t know how to make that sort of thing work in Epicor.
Renewals are not one to one matches most of the time for us, it’s common to have some lines from the original get inactivated prior to renewal, which makes the lines on the renewal have a different number. Which is fine for the first renewal, we have the original line number. But the 2nd renewal doesn’t copy the line number from the first renewal so we don’t know what it was renewed from.
Any ideas?