Getting the Page ID of an Object through REST/SOAP API - Forum - Rollbase - Progress Community

Getting the Page ID of an Object through REST/SOAP API

 Forum

Getting the Page ID of an Object through REST/SOAP API

This question is answered

Hello,

Is there a way to get the Page ID of the view page of an object through REST/SOAP API calls? Kindly let me know.

Cheers.

Verified Answer
  • Yes. Just use the original ID to build the URL.No need to query anything at runtime. For example, we have a Manage Users link in Rollbase. We have statically set its URL as  https://www.rollbase.com/master/m/main.jsp?oAppId=836899&oTabId=9248&oPageId=9106. We use original IDs for App, Tab and Page. This resolves correctly in every Rollbase customer zone in every Rollbase instance even though the actual App ID, Tab ID and Page ID is different in each.

All Replies
  • Hi,

    No API is available to get Page ID in REST/SOAP . We have API to get the Page based on ID.

    Thanks

    Satya

  • Ok so when we get that page based on ID, do we need to know the page ID of that page in advance? Can we not get the pageID using metadata API?

  • As of now the metadata API response doesn't include information regarding the pageID.

    Can you share the Use case for which you want to get the pageID from the metadata API?

  • Hello ,

    Yes basically I would like a particular user to be redirected to a particular view page and I am building the url myself using REST/SOAP API. I just thought since we could access the metadata information using REST/SOAP, may be there is page ID available in there?

  • Any suggestions?

  • We need to enhance the API to include the page  information. If we add the page info in the api, that would return a list of all the pages. Can you share with us , on the logic you want to identify the desired page (like originalID, name)?

  • Hello ,

    Thanks for getting back to me. Yeah I think having an API that takes in the objectName (like the other ones) and then the name of the Page would be the best way to get to a page ID.

    Example: rbf_getPageID(objName, pageName); // useful if we would like to redirect someone from the client side by building a URL

    ../rest/api/getPageID?sessionId=234234&objName=account&pageName='View Account' => REST API

    Kindly let me know if the above would be a possible in future releases?

  • page Name is not a unique field. You can have multiple pages with the same page name. Instead of page name you could use the page Original Id. You can find the page Original Id from the page details page.

     

    The url pattern for accessing a page through original Id is  "<RollbaseURL>/prod1/m/main.jsp?oPageId=133758540"  (instead of pageId , it should be oPageId)

  • Yes but the question remains, we don't have access to the original page ID from the list of helpers (for client-side scripting). I do understand that the page name is not unique and we have to go and fetch the page name anyways in order to make that API call and the same goes for original ID. I was just trying to see if there was a generic way to get the page ID rather than looking through the object definition to find the original ID. If I had to look at the original ID, I could just use that instead to build the URL?

  • Yes. Just use the original ID to build the URL.No need to query anything at runtime. For example, we have a Manage Users link in Rollbase. We have statically set its URL as  https://www.rollbase.com/master/m/main.jsp?oAppId=836899&oTabId=9248&oPageId=9106. We use original IDs for App, Tab and Page. This resolves correctly in every Rollbase customer zone in every Rollbase instance even though the actual App ID, Tab ID and Page ID is different in each.

  • Hi Anoop, I don't think this question is answered.  It isn't doing what Iram had asked for.  In my case, and maybe Iram's as well, I would like the system to give me what the ViewId is for a particular object because I would like to use the same JS code in multiple tenants that would contain the same object name.  For example, I would expect the getObjectDef request to have a Views Element and would return all the views that are available to the user that is currently in session for that object.  So that we can then make a getPage request using the viewId from the previous response.  How would one go about doing this process?

  • Since you developed the app you can hard code the Original ID in your logic since it wont change with tenant.

  • So you're saying that if the application gets cloned, the ViewId will remain the same?  That doesn't make sense to me.  Aren't these Ids supposed to be unique?  In addition, I also want to be able to know which views are available to which users and hardcoding the view id will not solve that problem...

  • When application gets exported and installed on to other tenants, original id will be preserved. Use of Original ID is the prescribed way to write apps that re portable across many tenants. Clone is a different action. When you clone you get a new everything. I suggested Original Id because you mentioned this  - "because I would like to use the same JS code in multiple tenants that would contain the same object name"

    Sachin/Iram,

    I see that we have lot of threads open from Orbis. We would like to have a meeting and work things out. Tech support will reach out to you today for scheduling a conference call. Please suggest an hour time suitable for this.

  • Suresh,

    Just realized you are from FMC and not Orbis, can you elaborate on your use case ?