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

Posted by IramK on 12-Aug-2015 09:35

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.

Posted by Anoop Premachandran on 07-Sep-2015 09:52

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

Posted by satyanarayana sunku on 13-Aug-2015 01:32

Hi,

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

Thanks

Satya

Posted by IramK on 13-Aug-2015 03:14

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?

Posted by Sridhar Duggi on 21-Aug-2015 06:08

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?

Posted by IramK on 21-Aug-2015 06:12

Hello [mention:bf682d0ae4d64f6eb7c98874f020d595:e9ed411860ed4f2ba0265705b8793d05] ,

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?

Posted by IramK on 24-Aug-2015 05:58

Any suggestions?

Posted by Sridhar Duggi on 28-Aug-2015 06:32

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)?

Posted by IramK on 28-Aug-2015 08:41

Hello [mention:bf682d0ae4d64f6eb7c98874f020d595:e9ed411860ed4f2ba0265705b8793d05] ,

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?

Posted by Sridhar Duggi on 04-Sep-2015 05:52

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)

Posted by IramK on 04-Sep-2015 06:12

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?

Posted by Anoop Premachandran on 07-Sep-2015 09:52

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.

Posted by Sachin Suresh on 10-Nov-2015 07:25

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?

Posted by Anoop Premachandran on 10-Nov-2015 07:44

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

Posted by Sachin Suresh on 10-Nov-2015 08:41

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...

Posted by Anoop Premachandran on 11-Nov-2015 23:47

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.

Posted by Anoop Premachandran on 12-Nov-2015 03:02

Suresh,

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

This thread is closed