LightningFlowComponents icon indicating copy to clipboard operation
LightningFlowComponents copied to clipboard

*Datatable* - _Lookup Link_ - Incorrect link assembly when embedded in visualforce/lightning out

Open gudavies opened this issue 4 years ago • 2 comments

Steps to reproduce

Steps to reproduce the behavior:

  1. Embed flow in a visualforce
  2. Add a lookup column / name column
  3. Click record link

Expected behaviour

Tell us what should happen Record should open by combining datatableUtils with datatable logic Should detect it is visualforce domain embed, and rewrite target link accordingly

Actual behaviour

Tell us what happens instead incorrectly assembles a target url --nforce.visualforce.com/apex/bodycontainer?app=vf-example.vf-page-name&id=a2e0n0000001j7XAAAdetail/0010n000025kJR1AAA

Screenshots

If applicable, add screenshots to help explain your problem. image image

Debug Logs

If applicable, please insert debug logs here

Debug Log Information Id value is not valid for the [object] standard controller

Recommend to review datatable.js line 827-847, together with datatableUtils.js line 11-21 The code itself still looked as if it should work. This used to work in prior version (3.0.1?). Unsure if core SF change occured or change to lookup linking in this component since. Was handled by line 14 in past.

I tried to untick the name field as link option, however name field still shows as clickable link. Perhaps a sub component is taking overriding the link functionality?

gudavies avatar Aug 16 '21 01:08 gudavies

@gudavies Can you share how you have embedded your flow in the VF page? The "Show navigation links on Name fields" attribute only affects the "Name" field for the Object being displayed in the Datatable. Lookup fields will still show as a link. Do you think there is a use case to disable the links for Lookup fields as well?

ericrsmith35 avatar Aug 28 '21 17:08 ericrsmith35

I have a similar issue. However I am not embedding in a visualforce page, I am calling my flow via a URL from an object's listview. image image

I have it set up to "Show navigation links on Name fields" but when trying to open the links, I am navigated to a new tab with the same flow (link has been obscured to hide domain and ids):

https://XXXXXX.sandbox.vf.force.com/flow/Development_Update_Pipeline_Projects?ltn_app_id=06m0P000000MXXXXXX&sfdcIFrameHost=web&clc=0&sfdcIFrameOrigin=https%3A%2F%2FXXXXXX.sandbox.lightning.force.com&nonce=ce1555fec0b71c357b4ed9e3c23a5f3625b48XXXXXXXXXXXXXXXXXXXXXXXXXXX&tour=%2Fs%2Fdetail%2Fa0a6C000002QXXXXXX&

Essentially it just re-opens the flow in another tab instead of navigating me to the record.

njamison avatar Apr 09 '24 22:04 njamison

@gudavies @njamison Can you retry with the latest release (v4.3.0) of Datatable? https://unofficialsf.com/datatable-lightning-web-component-for-flow-screens-2/

ericrsmith35 avatar Jul 22 '24 19:07 ericrsmith35

@ericrsmith35 Thanks for taking care of this! Apologies for the delay in testing but I was just able to test and it does resolve the issue for me. Great work as always!

njamison avatar Aug 15 '24 17:08 njamison