• Eric Boller 14
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 8
    Questions
  • 12
    Replies
Is it possible to send messages from RabbitMQ behind a firewall and receive them in Salesforce? If so, what is the best way to do this?
We want to integrate an event platform we use called eTouches with Salesforce. Primarily, to insert attendees as Salesforce records. After each registration, eTouches can post to a URL that we specify with the attendee ID. The post is not configurable beyond specifying the URL. Is there a way to listen for this post in Salesforce and then execute logic if a post is made? I started to look into using an Apex REST web service, but I'm not sure if that will work as the post that eTouches makes isn't configurable.
Is there any way to make the Salesforce Classic custom home page components (the components that display in the sidebar on most pages in Salesforce Classic) compatible with Salesforce Lightning UI with the same functionality?
Hello,


I've followed https://10226ec94e53f4ca538f-0035e62ac0d194a46695a3b225d72cc8.ssl.cf2.rackcdn.com/docusign-for-salesforce-custom-button-logic.pdf in order to create a custom button in Salesforce that attempts to send a DocuSign template to the contact (button placed on contact object). However, when the button is clicked, nothing happens. Could someone please provide some insight?

 

Code:

 

{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")}//********* Option Declarations (Do not modify )*********// var RC = '';var RSL='';var RSRO='';var RROS='';var CCRM='';var CCTM='';var CCNM='';var CRCL=''; var CRL='';var OCO='';var DST='';var LA='';var CEM='';var CES='';var STB='';var SSB='';var SES='';var SEM='';var SRS='';var SCS ='';var RES=''; //*************************************************// // Modify individual options here: // Related Content (default no related content) RC = ''; //Ex: GetRelContentIDs("{!Opportunity.Id}"); // Recipient Signer Limit (default no limit) RSL = ''; //Ex: '3' // Recipient Starting Routing Order (default 1) RSRO = ''; // Ex: '1' // Recipient Routing Order Sequential (default not sequential) RROS = ''; //Ex: '1' // Custom Contact Role Map (default config role) CCRM = ''; //Ex: 'Decision Maker~Signer1;Economic Buyer~Carbon Copy' // Custom Contact Type Map (default Signer) CCTM = ''; //Ex: 'Decision Maker~Signer;Economic Buyer~CC' // Custom Contact Note Map (default no note) CCNM = ''; //Ex: 'Decision Maker~Note for DM;Economic Buyer~Note For EB;DEFAULT_NOTE~Default Note' // Custom Related Contact List (default object contact) CRCL = ''; //Ex: 'MyContacts__r,Email~Email__c;FirstName~First_Name__c;LastName~Last_Name__c;Role ~Role__c,LoadDefaultContacts~0' // Custom Recipient List CRL = ''; //Ex: 'Email~;FirstName~;LastName~;Role~SignInPersonName~;RoutingOrder~;AccessCode~;Re cipientNote~;SignNow~, LoadDefaultContacts~1' // One Click Option (default edit envelope screen) OCO = 'Send'; //Ex: Tag // DocuSign Template ID (default no template) DST = '1921E139-7CCD-4022-986A-B21B8E7FB29C'; //Ex: '67870A79-A0B5-4596-8AC1-CC7CC1EA01EB' // Load Attachments (default on) LA = ''; //Ex: '0' // Custom Email Message (default in config) CEM = ''; //Ex: 'Envelope sent by [FirstName] [LastName] ([Email])!' // Custom Email Subject (default in config) CES = ''; //Ex: 'Re: Opportunity Name: {!Opportunity.Name}' // Show Tag Button (default in config) STB = ''; //Ex: '1' // Show Send Button (default in config) SSB = ''; //Ex: '1' // Show Email Subject (default in config) SES = ''; //Ex: '1' // Show Email Message (default in config) SEM = ''; //Ex: '1' // Show Reminder/Expire (default in config) SRS = ''; //Ex: '1' // Show Chatter (default in config) SCS = ''; //Ex: '1' // Reminder and Expiration Settings RES = ''; //Ex: '0,1,2,0,120,3' //********* Page Callout (Do not modify) *********// window.location.href = "/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID={!Contact.Id}&RC="+RC+"&RSL="+RSL+"&RSRO="+RSRO+"&RROS="+RROS+"&CCRM="+CCRM+"&CCTM="+CCTM+"&CRCL="+CRC L+"&CRL="+CRL+"&OCO="+OCO+"&DST="+DST+"&CCNM="+CCNM+"&LA="+LA+"&CEM="+CEM+"&CES= "+CES+"&SRS="+SRS+"&STB="+STB+"&SSB="+SSB+"&SES="+SES+"&SEM="+SEM+"&SRS="+SRS+"& SCS="+SCS+"&RES="+RES; //*******************************************//
I'm trying to write a formula field that determines percent of other fields completed but getting thousands of percents. Why doesn't the below work?

(IF(ISBLANK( TEXT(Industry__c)   ), 0, 1) + IF(ISBLANK( No_of_Employees__c ),
0,1) + IF(ISBLANK(  Number_of_Locations__c  ), 0,1) + IF(ISBLANK(   Cities_of_Locations__c   ), 0,1) + IF(ISBLANK(   TEXT(Current_Carrier__c)   ), 0,1) + IF(ISBLANK(   Factors__c   ), 0,1) + IF(ISBLANK(   Pain__c   ), 0,1) + IF( Number_of_Locations__c  = 1, 0,1)) * 12.5
Hello,

How can you create a lookup relationship using the ID for the related record? For example, we have a lookup relationship from leads to contacts. There is a field on the leads containing the ID of the contact that the lead should be joined to. How can we automatically create this association?

We have the below custom button on opportunities:

{!REQUIRESCRIPT("/soap/ajax/19.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/19.0/apex.js")} 
var eQuoteEndpoint = sforce.apex.execute("UAUpdate","GenerateEQ", 
{user_id:"{!Opportunity.OwnerId}",opp_id:"{!Opportunity.Id}"});
//var eQuoteEndpoint =  //'URL REDACTED' + "token=//{!User.Quote_Token__c}" + "&opportunityId={!Opportunity.Id}";
console.log(String(eQuoteEndpoint)); 
window.open(String(eQuoteEndpoint));

Every so often it gives the below error:

A problem with the OnClick JavaScript for this button or link was encountered:

{faultcode:'soapenv:Client',
faultstring:'System.QueryException: LIst has no rows for assignment to SObject

Class.UAUpdate.GenerateEQ: line 9, column 1', }
 

As far as I can tell, it is referencing the below Apex class (only pasted until line 9 out of 184).

global class UAUpdate{
    public static boolean isApexTest = false;
    
    WebService static String GenerateEQ(String user_id, String opp_id){
      // Perform SOQLs to obtain relevant information.
      User user = [SELECT Id, Quote_Token__c FROM User WHERE Id = :user_id LIMIT 1];
      Opportunity opp = [SELECT Id, AccountId FROM Opportunity WHERE Id = :opp_id LIMIT 1];
      Account account = [SELECT Id, Name FROM Account WHERE Id = :opp.AccountId LIMIT 1];
      Contact contact = [SELECT Id, Email, FirstName, LastName, MailingCity, MailingPostalCode, MailingState, MailingStreet, Phone FROM Contact WHERE AccountId = :opp.AccountId LIMIT 1];

Is the class trying to reference a missing record/object? I can't tell what exactly it would be and how to fix it. Would appreciate any help.

 

Why does this work:

AND(NOT(ISPICKVAL( LeadSource , "Live Chat")) , NOT( $UserRole.Id = "00E70000001A1gy" ), ISBLANK( Phone ) )

But this doesn't (no syntax errors are thrown):

AND( OR(NOT( ISPICKVAL( LeadSource , "Live Chat")),NOT( ISPICKVAL( LeadSource , "Offline Message"))) ,  NOT( $UserRole.Id = "00E70000001A1gy"  ), ISBLANK( Phone )   )

How do I make the rule function so I can include mutlople lead source values?
We want to integrate an event platform we use called eTouches with Salesforce. Primarily, to insert attendees as Salesforce records. After each registration, eTouches can post to a URL that we specify with the attendee ID. The post is not configurable beyond specifying the URL. Is there a way to listen for this post in Salesforce and then execute logic if a post is made? I started to look into using an Apex REST web service, but I'm not sure if that will work as the post that eTouches makes isn't configurable.
Hello,


I've followed https://10226ec94e53f4ca538f-0035e62ac0d194a46695a3b225d72cc8.ssl.cf2.rackcdn.com/docusign-for-salesforce-custom-button-logic.pdf in order to create a custom button in Salesforce that attempts to send a DocuSign template to the contact (button placed on contact object). However, when the button is clicked, nothing happens. Could someone please provide some insight?

 

Code:

 

{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")}//********* Option Declarations (Do not modify )*********// var RC = '';var RSL='';var RSRO='';var RROS='';var CCRM='';var CCTM='';var CCNM='';var CRCL=''; var CRL='';var OCO='';var DST='';var LA='';var CEM='';var CES='';var STB='';var SSB='';var SES='';var SEM='';var SRS='';var SCS ='';var RES=''; //*************************************************// // Modify individual options here: // Related Content (default no related content) RC = ''; //Ex: GetRelContentIDs("{!Opportunity.Id}"); // Recipient Signer Limit (default no limit) RSL = ''; //Ex: '3' // Recipient Starting Routing Order (default 1) RSRO = ''; // Ex: '1' // Recipient Routing Order Sequential (default not sequential) RROS = ''; //Ex: '1' // Custom Contact Role Map (default config role) CCRM = ''; //Ex: 'Decision Maker~Signer1;Economic Buyer~Carbon Copy' // Custom Contact Type Map (default Signer) CCTM = ''; //Ex: 'Decision Maker~Signer;Economic Buyer~CC' // Custom Contact Note Map (default no note) CCNM = ''; //Ex: 'Decision Maker~Note for DM;Economic Buyer~Note For EB;DEFAULT_NOTE~Default Note' // Custom Related Contact List (default object contact) CRCL = ''; //Ex: 'MyContacts__r,Email~Email__c;FirstName~First_Name__c;LastName~Last_Name__c;Role ~Role__c,LoadDefaultContacts~0' // Custom Recipient List CRL = ''; //Ex: 'Email~;FirstName~;LastName~;Role~SignInPersonName~;RoutingOrder~;AccessCode~;Re cipientNote~;SignNow~, LoadDefaultContacts~1' // One Click Option (default edit envelope screen) OCO = 'Send'; //Ex: Tag // DocuSign Template ID (default no template) DST = '1921E139-7CCD-4022-986A-B21B8E7FB29C'; //Ex: '67870A79-A0B5-4596-8AC1-CC7CC1EA01EB' // Load Attachments (default on) LA = ''; //Ex: '0' // Custom Email Message (default in config) CEM = ''; //Ex: 'Envelope sent by [FirstName] [LastName] ([Email])!' // Custom Email Subject (default in config) CES = ''; //Ex: 'Re: Opportunity Name: {!Opportunity.Name}' // Show Tag Button (default in config) STB = ''; //Ex: '1' // Show Send Button (default in config) SSB = ''; //Ex: '1' // Show Email Subject (default in config) SES = ''; //Ex: '1' // Show Email Message (default in config) SEM = ''; //Ex: '1' // Show Reminder/Expire (default in config) SRS = ''; //Ex: '1' // Show Chatter (default in config) SCS = ''; //Ex: '1' // Reminder and Expiration Settings RES = ''; //Ex: '0,1,2,0,120,3' //********* Page Callout (Do not modify) *********// window.location.href = "/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID={!Contact.Id}&RC="+RC+"&RSL="+RSL+"&RSRO="+RSRO+"&RROS="+RROS+"&CCRM="+CCRM+"&CCTM="+CCTM+"&CRCL="+CRC L+"&CRL="+CRL+"&OCO="+OCO+"&DST="+DST+"&CCNM="+CCNM+"&LA="+LA+"&CEM="+CEM+"&CES= "+CES+"&SRS="+SRS+"&STB="+STB+"&SSB="+SSB+"&SES="+SES+"&SEM="+SEM+"&SRS="+SRS+"& SCS="+SCS+"&RES="+RES; //*******************************************//
I'm trying to write a formula field that determines percent of other fields completed but getting thousands of percents. Why doesn't the below work?

(IF(ISBLANK( TEXT(Industry__c)   ), 0, 1) + IF(ISBLANK( No_of_Employees__c ),
0,1) + IF(ISBLANK(  Number_of_Locations__c  ), 0,1) + IF(ISBLANK(   Cities_of_Locations__c   ), 0,1) + IF(ISBLANK(   TEXT(Current_Carrier__c)   ), 0,1) + IF(ISBLANK(   Factors__c   ), 0,1) + IF(ISBLANK(   Pain__c   ), 0,1) + IF( Number_of_Locations__c  = 1, 0,1)) * 12.5
Hello,

How can you create a lookup relationship using the ID for the related record? For example, we have a lookup relationship from leads to contacts. There is a field on the leads containing the ID of the contact that the lead should be joined to. How can we automatically create this association?

We have the below custom button on opportunities:

{!REQUIRESCRIPT("/soap/ajax/19.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/19.0/apex.js")} 
var eQuoteEndpoint = sforce.apex.execute("UAUpdate","GenerateEQ", 
{user_id:"{!Opportunity.OwnerId}",opp_id:"{!Opportunity.Id}"});
//var eQuoteEndpoint =  //'URL REDACTED' + "token=//{!User.Quote_Token__c}" + "&opportunityId={!Opportunity.Id}";
console.log(String(eQuoteEndpoint)); 
window.open(String(eQuoteEndpoint));

Every so often it gives the below error:

A problem with the OnClick JavaScript for this button or link was encountered:

{faultcode:'soapenv:Client',
faultstring:'System.QueryException: LIst has no rows for assignment to SObject

Class.UAUpdate.GenerateEQ: line 9, column 1', }
 

As far as I can tell, it is referencing the below Apex class (only pasted until line 9 out of 184).

global class UAUpdate{
    public static boolean isApexTest = false;
    
    WebService static String GenerateEQ(String user_id, String opp_id){
      // Perform SOQLs to obtain relevant information.
      User user = [SELECT Id, Quote_Token__c FROM User WHERE Id = :user_id LIMIT 1];
      Opportunity opp = [SELECT Id, AccountId FROM Opportunity WHERE Id = :opp_id LIMIT 1];
      Account account = [SELECT Id, Name FROM Account WHERE Id = :opp.AccountId LIMIT 1];
      Contact contact = [SELECT Id, Email, FirstName, LastName, MailingCity, MailingPostalCode, MailingState, MailingStreet, Phone FROM Contact WHERE AccountId = :opp.AccountId LIMIT 1];

Is the class trying to reference a missing record/object? I can't tell what exactly it would be and how to fix it. Would appreciate any help.

 

Why does this work:

AND(NOT(ISPICKVAL( LeadSource , "Live Chat")) , NOT( $UserRole.Id = "00E70000001A1gy" ), ISBLANK( Phone ) )

But this doesn't (no syntax errors are thrown):

AND( OR(NOT( ISPICKVAL( LeadSource , "Live Chat")),NOT( ISPICKVAL( LeadSource , "Offline Message"))) ,  NOT( $UserRole.Id = "00E70000001A1gy"  ), ISBLANK( Phone )   )

How do I make the rule function so I can include mutlople lead source values?
I am trying to create a work flow on a lead that will alert an owner when the lead has been in "Working" status for more than 14 days. At this point, the system should create a task. I have created a date field that tracks the date. I have tried using a formula to count the number of days and set the workflow criteria o 14. That  did not work. I have also tried using a custom field that updates with todays date when the lead is changed to working. But, nothing seemes to work. I know about time based workflows, but I can't "build" on my previous worklow, but doing that prevents the lead from being able to be converted. 
  • April 02, 2014
  • Like
  • 0

Hi,

 

I am trying to build a formula that counts empty fields. All fields are numerical. Users may populate them all, but these are not required. So I'd like to count how many fields they did not populate. Here's the number formula I built -- it simply returns 0. Any ideas?

 

IF  ( ISBLANK ( accceptance_assign_to_self_time__c  ) , 1 , 0 ) + 
IF  ( ISBLANK ( response_time__c ) , 1 , 0 ) + 
IF  ( ISBLANK ( clarity__c ) , 1 , 0 ) + 
IF  ( ISBLANK ( grammar__c ) , 1 , 0 ) + 
IF  ( ISBLANK ( spelling__c )  , 1 , 0 ) + 
IF  ( ISBLANK ( punctuation__c ) , 1 , 0 ) + 
IF  ( ISBLANK ( tone__c )  , 1 , 0 ) + 
IF  ( ISBLANK ( accuracy_of_refund_request__c ) , 1 , 0 ) + 
IF  ( ISBLANK ( answered_customer_correctly__c ) , 1 , 0 ) + 
IF  ( ISBLANK ( appropriate_changes_to_account__c ) , 1 , 0 ) + 
IF  ( ISBLANK ( case_categorization__c )  , 1 , 0 ) + 
IF  ( ISBLANK ( escalations__c ) , 1 , 0 ) + 
IF  ( ISBLANK ( follow_up__c ) , 1 , 0 ) + 
IF  ( ISBLANK ( customer_satisfaction__c ) , 1 , 0 ) + 
IF  ( ISBLANK ( follow_procedures_and_guidelines__c) , 1 , 0 )

 

Thanks!

Hey everyone. I got this email warning me of nearing a Governor limit of SOQL queries. I'm not too worried at this stage, but what I'm confused on is identifing what series of code is getting me the warning. The operation is: WorkflowQueue.null which sounds like it's a timebased workflow -- but there's no information that I can see that will indicate what rule fired that caused all the SOQL queries.

 

Anyone have an idea where to look? Since it doesn't send the warning until after the workflow fires - I haven't been able to see what workflow happened in the past (just upcoming scheduled timebased workflows).

 

Subject: Apex governor limit warning
Operation: workflowQueue.null

By user/organization: 00530000000feI7/00D300000000QWu

Caused the following Apex resource warnings:

Number of SOQL queries: 13 out of 20

(these emails can be disabled from the user detail page for this user)

 

I thought I'd share since figuring this out was kind of crappy.  Since you can't (or I couldn't find how) concatenate a string in an SOQL query to combine wildcards like % and _ to make a query, you need to do so with the variable you want to pass in.

 

So if you want to do an SOQL query using LIKE, wild cards, and an Apex variable, this will work.

 

//create a string
String s = 'mystring';

//add wildcards around it to be more flexible in the search
s = '%' + s + '%';

//create an SOBject list with the results from our query
SObject[] obj = [select id from SObjectName where Name LIKE :s];

 

and this will return any row from the SObjectName where the "Name" field has "mystring" in it.