• Kerby Court 3
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
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. 
I'd want my formula to walk through three sets of critiera, find the 'TRUE' set and display the corresponding graphic. If none of the three sets are 'TRUE', then display the 'default' graphic. 

I've started testing with 2 sets of criteria and keep getting: "Error: Incorrect parameter type for function 'OR()'. Expected Boolean, received Text". I'm very new to this and cannot seem to find the syntax fix. The basic formula is cobbled together from things I've learned in this community. I'd appreciate any help in sorting out how to get the syntax correct.

IF(
OR(
AND(
TEXT(Plan_Status__c) ="Signed (Complete)",
(Release__c), TRUE,
(Statement__c), TRUE,
(Premium_Breakout__c), TRUE,
(Detail__c), TRUE,
(History__c), TRUE), IMAGE("/servlet/servlet.FileDownload?file=01536000002K6JO","One_Green_Check"),
OR(
AND(
TEXT(Plan_Status__c) ="Signed (Complete)",
(Release__c), TRUE,
(Statement__c), TRUE,
(Premium_Breakout__c), TRUE,
(Detail__c), TRUE,
(History__c), TRUE,
TEXT(Report_Status__c)= "Verified"), IMAGE("/servlet/servlet.FileDownload?file=01536000002K6JT","Two_Green_Checks"),
IMAGE("/servlet/servlet.FileDownload?file=01536000002K6JJ", "Three_Xs"))))

Thanks in advance for the help. 
I'd want my formula to walk through three sets of critiera, find the 'TRUE' set and display the corresponding graphic. If none of the three sets are 'TRUE', then display the 'default' graphic. 

I've started testing with 2 sets of criteria and keep getting: "Error: Incorrect parameter type for function 'OR()'. Expected Boolean, received Text". I'm very new to this and cannot seem to find the syntax fix. The basic formula is cobbled together from things I've learned in this community. I'd appreciate any help in sorting out how to get the syntax correct.

IF(
OR(
AND(
TEXT(Plan_Status__c) ="Signed (Complete)",
(Release__c), TRUE,
(Statement__c), TRUE,
(Premium_Breakout__c), TRUE,
(Detail__c), TRUE,
(History__c), TRUE), IMAGE("/servlet/servlet.FileDownload?file=01536000002K6JO","One_Green_Check"),
OR(
AND(
TEXT(Plan_Status__c) ="Signed (Complete)",
(Release__c), TRUE,
(Statement__c), TRUE,
(Premium_Breakout__c), TRUE,
(Detail__c), TRUE,
(History__c), TRUE,
TEXT(Report_Status__c)= "Verified"), IMAGE("/servlet/servlet.FileDownload?file=01536000002K6JT","Two_Green_Checks"),
IMAGE("/servlet/servlet.FileDownload?file=01536000002K6JJ", "Three_Xs"))))

Thanks in advance for the help.