I need to create a custom link to an Edit Page from a Generi

Posted by jquerijero on 05-Mar-2015 13:15

The "Edit Page [URL]" requires a record id. How do you create custom link to the Edit Page from a Generic Page but still dynamically figure out the record id?

Since you can drag and drop the Edit Page using the page editor, there must be a way to get the record id. 

All Replies

Posted by Gian Torralba on 05-Mar-2015 14:29
Hello,

You can use the edit page token when designing the page. Just create a custom link with the edit page token together with the ID you want to edit.

Thank you,
Gian
Posted by jquerijero on 05-Mar-2015 14:34

Sorry I forgot an important info. I'm building portal pages. My problem is figuring out the ID of the record I want to edit on Generic Page which doesn't offer the tokens for any record not in scope.

Posted by Gian Torralba on 05-Mar-2015 16:37
Hello,

You can still access these tokens in the template helper popup when creating a script component in a page. You need to create the object's edit page so that the token becomes available for use. Then you can just add the
Posted by jquerijero on 05-Mar-2015 16:47

Unfortunately, tokens for the Objects are not available for Generic Page only the tokens for the Portal Page. Here is the token for my Edit Page;

{!#PORTAL.110778100.110797652#url}&id=

I need to provide the value for the &id.

Posted by Gian Torralba on 06-Mar-2015 09:57

Hello,

Are you referring to the Portal's object edit page? If so, the token is available for use in the template helper once you create an object's edit page for the portal. For the ID, you need to specify what ID you need so that it will redirect to the records' edit page.

Thank you,

Gian

Posted by jquerijero on 06-Mar-2015 11:32

How do you find the correct ID to use? That's my issue. How does the "draggable" link component figure out the correct ID even inside a generic page?

Posted by pvorobie on 06-Mar-2015 11:44

The real question is: which record you want to edit? If you know the answer, you know ID.

Posted by jquerijero on 10-Mar-2015 08:45

How do you do that? In ASP programming, it allows you to maintain context variables. Remember that there are no tokens available for use.

Posted by Gian Torralba on 10-Mar-2015 09:44

Hello,

You can check the ID of each record by displaying the record ID in the list view or view page of an object.

Thank you,

Gian

Posted by jquerijero on 10-Mar-2015 09:51

Unfortunately that approach will not work. I'm working on a portal page. I don't know beforehand which record I'll be dealing with.

Going back to my question, how does the selectable link component available in the Page Editor figure out the correct link to an edit page even when it's on a Generic page?

Posted by Gian Torralba on 11-Mar-2015 10:50
Hello,

Edit pages are restricted for records only. You cannot use an edit page without having a specific record to edit. Can you provide a sample approach on what you are doing?

Thank you,
Gian
Posted by jquerijero on 11-Mar-2015 11:01

My Print Page is a Generic Page. You can see that you can drop an Edit Page link to it using the page editor. I want to mimic what the link does for some other reason. I know I can just use it, but I want to know some background how is this possible.   

Posted by Gian Torralba on 13-Mar-2015 15:40
Hello,

I see. Thank you for posting that screenshot. I believe you cannot mimic that since that link will redirect you to the last record you've been to. For example. I go to record 1's edit page and then click on the edit page portal link. It will redirect me to record 1's edit page. If I cancel it and then go to record 2's edit page and then click the edit page portal link again, it will redirect me to the record 2's edit page.

Hope the information I gave you is clear,

Thank you,
Gian
This thread is closed