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.
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
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.
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
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.
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?
The real question is: which record you want to edit? If you know the answer, you know ID.
How do you do that? In ASP programming, it allows you to maintain context variables. Remember that there are no tokens available for use.
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
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?
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
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