function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DanNVMDanNVM 

Custom Links showing as #Error on Page Layouts

We have recntly distributed a managed package to our company internally.

 

This package contains custom page layouts with custom links.

 

To [Profile] Standard Platform Users and System Administrators this works fine without any problems, however with custom profiles used by the majority of our organisationinplace of the link they are presented with #Error

 

The only way we are able to enable this custom link for custom profiles is by enabling "View All Data" in the Administrative Permissions section of the custom profile.

This may not be appropriate for future deployments.

 

Could anyone assist in explaining why this is the case and/or how to resolve the issue. I am happy to provide further information on how the organisation is setup and how the package was created if required.

 

Thanks in advance.

Greg HGreg H

You must be using a formula of some sort to build the custom links? If the formula results in an error, like dividing by zero, or the formula uses a field that is not accessible to the users in specific profiles then this would result in the "#Error" text. Since users in certain profiles have access and you can get everyone access by enabling the "View All Data" permission on the profiles then my guess is you're using a field within the formula that cannot be accessed by all profiles. Check that all the fields being used in your link are accessible to all profiles.
-greg

DanNVMDanNVM

Thanks Greg,

 

We are using the forumla as follows:

 

IF(
LEN( MobilePhone )>0 ,
HYPERLINK( $NAMESPACE & MobilePhone , MobilePhone , "<NAME>") & " " & IMAGE( "../servlet/servlet.FileDownload?file=XXXXXXXXXXXX", "<ALTTEXT>"),
""
)

Where the namesapce is a URL such as "http://mydomain.com/mypage.aspx?param=" As you can see we are testing the field is present before applying the formula. This is done on several fields and these custom links are used in the custom page layouts included in the package. As you have correctly pointed out, i think it maybe that some profiles do not have access to the fields used. I will check the fields used against the fields available to the custom profiles in question.

 

trf199trf199

To add to this - the url in question actually comes from a custom setting with data type URL, which is added at the default organizational value level. This is the source of the permission problem because if it is replaced with a static string the formula works fine for everyone.

Does anyone know why it is that some users can't get access to the default org level custom setting without having "view all data" checked? Or better still what setting will enable them to see it, or how we can go about finding out the reason for this?

 

Thanks