You need to sign in to do that
Don't have an account?
sai kumar 625
Detail Page Link in Managed Package.
Hello All,
We are displaying report through detail page links on our custom objects. But the issue is when I install this as a package, in the target org the report is not getting displayed because report ID gets changed from org to org.Moreover I am not able to edit this detail page link as it is a managed pacakge componenet. So any suggestion for this or any alternative for this. Your help will be really appreacated.
We are displaying report through detail page links on our custom objects. But the issue is when I install this as a package, in the target org the report is not getting displayed because report ID gets changed from org to org.Moreover I am not able to edit this detail page link as it is a managed pacakge componenet. So any suggestion for this or any alternative for this. Your help will be really appreacated.
Passing Id directly in a managed package is never a good option. You can instead query the Id of the report using this query in your package:
SELECT DeveloperName,Id FROM Report WHERE DeveloperName = 'test_rep' limit 1
Hope that answers your question.
we are passing that ID in detail page link under objects. How to pass SELECT DeveloperName,Id FROM Report WHERE DeveloperName = 'test_rep' limit 1 in the detail page link, when I try the syntax throws error.
I am sorry it seems like there was some miscommunication from my end. However, you cannot use a simple query directly in the button. What you need to do is in behavior select execute Javascript and use javascript similar to this:
Also, take care that now the merge fields need to be inside single quotes otherwise the script will throw an error of unexpected token.