Having trouble with $rx.location.generate()

$rx.location.generate(assemblyItem) seems to generate a location only to Default Templates, and even then, will always pick the same template (usually the one with the lowest numerical ID).

Does anyone know how to force this method to pick a different template to generate a location for?

Thanks in advance,
– Rushing

There is a second parameter that you can pass to it to specify the template ($rx.location.generate(assemblyItem, templateName) ). I believe this is documented on page 425 on the Rx Implementation Guide (v 6.7).

Yes! thank you. That did the trick.