Determine TemplateId

Posted by coates_aj on 21-Mar-2016 16:13

Hi,

I have an OpenEdge Service Object defined with a document template. I am trying to construct a link where I need to get hold of the templateId. How can I reliably retrieve the templateId using either server side or client side scripting.

Can any of the following be used to find it: Original Id, integration Code, or Template Name?

Thanks for any help

Posted by Rishav Goyal on 26-Apr-2016 07:08

A new api getIdByOriginalId has been added to 4.2 Release. It is valid for all the metadata's.

All Replies

Posted by Manooj Murali on 24-Mar-2016 05:24

Hi -

We do not have such an api at the moment which can give you the id given original id/integration code/name etc. But, we can try to help you if you can explain your use case a bit more?

Regards.

Posted by Karthikeyan Bhaskaran on 27-Mar-2016 22:42

Hello Andrew, Can you share the details of your use case? It will help us to attempt a solution. Thank you, Karthikeyan

Posted by coates_aj on 29-Mar-2016 04:31

I have an Openedge Service object with a document template defined (format application/pdf). To actually see this template merged for one of  the records the user has to:

 select the main menu

 then select the drop down menu

 choose Templates

 Select the template from the list

 Preview

 Choose one of the records to preview

 Finally the user can now see a record merged with the document template

The link to this final page is something like this: localhost:8830/.../Template

It would be more preferable for one of the following:

 Select the main menu

 Select a link within the grid to bring up the merged document template record.

Or

 select the main menu

 view a record

 click a button or link within the view page to bring up the merged document template.

The whole link can be constructed easily enough apart from the templateId which changes for every  customer.

Posted by Karthikeyan Bhaskaran on 29-Mar-2016 22:39

Hi Andrew, I understand your requirement to mean, a template field alongside the record which can show the values populated into it for that record - instead of verifying the template from Object Definition > Templates > Select Template > Preview with a test record. Is that correct? I can confirm that there is a Document Template field that can be created, and added to the List View page for native Rollbase objects. The options for "New Field" for OE Service objects are limited, but I will dig some more and get back to you. But please confirm if I've understood your requirement correctly. Thanks, Karthikeyan

Posted by Manooj Murali on 30-Mar-2016 00:43

Hi -

In the case of OESO object's, you can map a JSDO field to a Document Template Field in Rollbase during Object import/create. Once that is done, you can create a document template and set this template in the created Document Template field. This field can then be shown on list views, view pages of the object's record which when clicked will display the generated document.

Regards.

Posted by coates_aj on 30-Mar-2016 04:07

ok, thanks guys I will give this a try as it sounds like the perfect solution

Posted by Karthikeyan Bhaskaran on 30-Mar-2016 04:40

Just a note: If you find that the Document Template field does not show the template yet, Edit the Record to ensure that the chosen field does have the actual template set as its value. Once it is set, this template will be visible from the Record view.

Posted by Rishav Goyal on 26-Apr-2016 07:08

A new api getIdByOriginalId has been added to 4.2 Release. It is valid for all the metadata's.

This thread is closed