How to update/refresh many lookup-based fields in an order template?

Discussions concerning general integration topics.

Moderator: Phil Barton

Post Reply
toddsou
Posts: 75
Joined: Wed Jul 25, 2012 9:39 am

How to update/refresh many lookup-based fields in an order template?

Post by toddsou »

Hi-

I have an order template which has several fields, each of which corresponds to a particular lookup table. Each of those fields are set to a particular code from its corresponding lookup table, and the corresponding description (and possibly others) fields were captured correctly when the template order was originally saved.

Now we want to update some of the entries in various lookup tables via SP Admin. However, the template orders would still be referencing the old values.

Is there some stand-alone API code I can write which would:
1) open the template order
2) iterate through a known list of fields we know have been updated via the spadmin lookup editor
3) For each field in that list within the template order, refresh its values from the corresponding lookup table again.
4) Save the template order

Thanks!
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: How to update/refresh many lookup-based fields in an order template?

Post by BobRichards »

We do not have a tool to do this. We would do it the same way you would - there is no magic and it will take a long time if you have a lot of templates that need updating.
  • Open the order
  • Grab the lookup code field value from the order and write it back to the same field. This should bring in all the current loop table row values.
  • Save the order.
Bob Richards, Senior Software Developer, SoftPro
Post Reply