• JackieDoan
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 1
    Replies

I have created a custom list button, which executes javascript. Instead of using GETRECORDIDS, I'd like to use record criteria (any related records where status = 'New'). I attempted to modify the code behind my button to accept the criteria using the sforce.connection.query, but keep getting errors. 

 

Here's the existing code:

 

{!REQUIRESCRIPT("/soap/ajax/24.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/24.0/apex.js")} 

var url = parent.location.href; 

var records = {!GETRECORDIDS($ObjectType.Contact)};
var updateRecords = []; 

if (records[0] == null) { 
alert("Please select at least one record to update."); 
} else {  
for (var a=0; a<records.length; a++) {  
var update_Contact = new sforce.SObject("Contact");  
update_Contact.Id = records[a];  
update_Contact.Status__c = "Transmit"; 
updateRecords.push(update_Contact); 
} 
result = sforce.connection.update(updateRecords); 
parent.location.href = url;  
}

 

Can anyone give me a suggestion on how to modify this so I can bypass the checkbox selection and use status  of "New" to execute the code?

 

Thanks!

We have a custom setting that populates values on a page. When I access it, as an admin, things are fine. When any other user tries to access the page, they get the error: sObject type 'CR_Disaster_Recovery_Questions__c' is not supported.

 


It's a 'List' type setting, with Public access. Any ideas what could be causing this?

Hi all,

 

I have created a VF page which displays a custom list view, in order to prevent my users from seeing the default 'new' button that exists on the standard custom object tab. 

 

I'd like to add inline editing functionality to this list view, but am unsure how to do it. Here's my code for the page:

 

<apex:page >
    <apex:enhancedList listId="00BQ0000000zEOg" height="600" customizable="false" rowsPerPage="25"/>
</apex:page>

We have a custom setting that populates values on a page. When I access it, as an admin, things are fine. When any other user tries to access the page, they get the error: sObject type 'CR_Disaster_Recovery_Questions__c' is not supported.

 


It's a 'List' type setting, with Public access. Any ideas what could be causing this?