• Derek Hoffritz 10
  • NEWBIE
  • 5 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
Hi All,

I want to create a button on the lightning home page, onclick on the button it will redirect to the dashboard. 
I created a dashboard on the lightining homepage but I want functionality that instead of dashboard button should be there, while user click on the button it will redirect the user to dashboard. 

How can we achieve this functionality? User-added image
We are trying to use the E2Excel "Export to Excel" button (downloaded from the App Exchange) on custom objects and it seems to work if you include it directly on the object, but when we try to lauch the button from a 'Related List' we are getting an error message: 

A problem with the OnClick JavaScript for this button or link was encountered: Cannot read property 'value' of undefined

I have very little experience with Java but here is the code they included in the instructions for installation of the botton on the object:

var str = parent.location.href;
var sobjid=str.substring(str.indexOf("?fcf")-3,str.indexOf("?fcf"));
var idArray = {!GETRECORDIDS('selected')};
var listview = document.getElementsByName('fcf')[0];
var listId = listview.value;
var listName = listview.options[listview.selectedIndex].text;
var idString = JSON.stringify(idArray);
window.open('apex/E2Ex__Export_To_Excel?idString='+idString+'&sobjid='+sobjid+'&listid='+listId+'&listName='+listName);

Again, it has worked 'as expected' when added to the Object. But when trying to use it from a 'related list' we get the error message. The buttom appears on the Related List next to the "New" button. Any help you can offer to sort this out, would be greatly appreciated. 
Hi all - forgive the "noob" question

I have a picklist on my Contracts object, and the possible values are: 'contract type a', 'contract type b, 'contract type n', etc....  I want to setup a formula field where, If 'contract type a' is selected, then the value of the formula field is "x".  If 'contract type b' is selected, then the value should be 'y', so on and so forth.  If no value is selected, it should be '0'.  

I can get one If else to work, but am having trouble adding in the other conditions.  Any help is much appreciated!