• Jim Williams
  • NEWBIE
  • 0 Points
  • Member since 2014
  • Senior Systems Architect

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 7
    Replies
My requirement is: I have a complex VF page that contains contact information with phone numbers (it is part of a custom automated outbound calling app).  There is a lot of logic that fires off via the "action" attribute on the "page" tag.  The action calls a method called  fetchMemberToProcess()  in the custom Apex controller.

I have been asked to incorporate calls to an external web service to determine the federal Do Not Call status of each phone number on the VF page.  So, as soon as a page is displayed, it will display said status next to each phone numebr.

I have the web services call/response working fine when I run my code through Execute Anonymous Apex window in the Developer console.

However, when I try to work the code into the fetchMemberToProcess()  method, I run into one of two errors depending on when I call the code:

1. If I call it after any DML in the fetchMemberToProcess() method, I of course get the known "Error:
You have uncommitted work pending. Please commit or rollback before calling out."

2. however, if I put the code before any DML in the fetchMemberToProcess() method,  I get an error saying that certain code references are now NULL and the page will not load.  For example "The value 'null' is not valid for operator '>'
Error is in expression '{!openActivity.size > 0}' in component <apex:pageBlockTable> in page agent"  - this refers to a list called openActivity in the fetchMemberToProcess() method.  If I remove the code that invokes the web service , the NULL problem disappears - so it is not data-related.   So it appears that control is never going back to the calling method after the web service is invoked.

I did research that there is a way to make separate JavaScript functions and use AJAX methodology to do a callout and refresh certain page elements; however, we do not want to require manual intervention (i.e. a pushbutton) to invoke the service.

Is there any way possible to make this work? 

Here is the first line of the VF page:  <apex:page controller="AgentController" docType="html-5.0" standardStylesheets="false" action="{!fetchMemberToProcess}" tabStyle="Call_Center_Agents__tab">

Here is the method I wrote in the controller that makes the callout.  gcc.CertifyPhoneNumbers() is the call I am trying to make to the custom class I had created that contains the routings to make the call.  ContactInfo.MobilePhone and ContactInfo.HomePhone are variables that already exist as per the page controller class via the fetchMemberToProcess() method .  MobilePhoneStatusDNC and HomePhoneStatusDNC are class variables in the page controller class.

public void GryphonCertifyPhones(){
                    // Jim Williams BEGIN GRYPHON
                    // This method must be called AFTER the initial method becuase a web service callout cannot be in same transaction as DML
                    GryphonCertifyContact gcc = New GryphonCertifyContact();
                    gcc.AddPhone(ContactInfo.MobilePhone, 'Mobile');
                    gcc.AddPhone(ContactInfo.HomePhone, 'Home');
                    gcc.CertifyPhoneNumbers();
                    MobilePhoneStatusDNC = gcc.GetPhoneCertStatus('Mobile');
                    HomePhoneStatusDNC = gcc.GetPhoneCertStatus('Home');
                    // Jim Williams END GRYPHON 
                    
}










 
Hi,

Because of SSLv3 Poodle vulnerability, we have turned off SSLv3 support on our web server. This in term is causing Salesforce outbound messaging to fail.

Is there a work around with this from Salesforce end?

The outbound messaging processing issue was resolved once we turn SSLv3 back on our web server.

Ted Tsung
How are domain names managed in My Domains vs Force.com Sites in Sandbox vs Production?

I am trying to understand how domains are used under "Domain Management" vs how a domain is set from "Develop"->"Sites"

We currently have two domains setup under Domain Management.  "mycompany.force.com" & "mycompany.my.salesforce.com".  Currently "mycompany.force.com/xxx" is setup to point to a communities site.

We want to create a force.com site and it tells us that we need to register a force.com domain.  So we try to do that using the domain "mycompany".  But it says that the domain is already in use.  Is that because we are using it for the communities site?  If so, is there a way to use it in both?

Also once we do lock in on the domain we want to use, should we create it in the sandbox first?  So in the sandbox would it be created as "mysandbox-mycompany.xxxxx.force.com".  Then on the production instance it would be "mycompany.force.com"?  Or would creating it in the sandbox steal it away from production.