• Eric-∑
  • NEWBIE
  • 50 Points
  • Member since 2013
  • Certified Salesforce Developer
  • SNAPBi

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 9
    Replies
I have a request from one of my business units to require 3 fields have a value when another field has a specific value.
IE: When case.Status_Type__c (picklist)= "BR Verified On-Site" then the following 3 fields ALL need to be populated:
MFG_Year__c (Text)
Boiler_Type__c (Picklist)
Fuel_Type__c (Picklist)


I know I can do this with 3 separate validation rules but was wondering if anyone knew how to create 1 rule that will accomodate all scenarios?

Any help would be greatly appreciated.
User-added image

I'm trying to write a couple of rules for a text field.  As per the screen cap, we would like the "Communication Preference Confirmed" text field to show "Recieved" if the "Communication Opt In Date" has a value OR if the Email Opt Out = True

or

We would also like the "Communication Preference Confirmed" text field to show "Required" if the "Communication Opt in Date"  = NULL and the "Email Opt Out" = False

Thanks!
Is it possible to specify the protocol in the HTTP callout to enforce AWS Marketplace API to use TLS1.1 or TLS1.2? When I call AWS Marketplace API from Salesforce, I got an error: System.CalloutException: Server chose TLSv1, but that protocol version is not enabled or not supported by the client.

I was not getting the error all the time, sometimes, it worked, but sometimes it didn't. So, it seems that AWS Marketplace chooses to use either TLS1.0 or advanced protocol when I called the API from Salesforce, but since Salesforce doesn't support TLS1.0 anymore, does anybody know how to specify the protocol to enforce AWS Marketplace API always use TLS1.1 or TLS1.2?
We are getting an exception when calling a Salesforce SOAP web service from Java. We wrote a SOAP web service in Salesforce and call it from Java. It has been working for long time, but recently, we got an error when calling the web service from Java. The following are the details of the error. Does anybody know how to solve such issue? Is it an error thrown from Salesforce or Java specific issue? It will be appreciated if anybody can provide some suggestions. Thanks.

javax.xml.soap.SOAPException: Failed to get connectionid. Reason: Failed to get connection id. Exception: JBAS014516: Failed to acquire a permit within 5 MINUTES
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1742)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2900)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:302)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at labvantage.labvantage.services.SapphireWS.SapphireWSSoapBindingStub.getConnectionId(SapphireWSSoapBindingStub.java:1499)
at com.appliedproteomics.labvantage.samplestatus.Sample.getSamples(Sample.java:237)
at com.appliedproteomics.labvantage.samplestatus.Main.fetchSamples(Main.java:111)
at com.appliedproteomics.labvantage.samplestatus.Main.main(Main.java:39)

I created a public site and enable it for customer community login. When I login as a community user, I need to create an Account record. But everytime when I try to create an Account record as a community user, I get the error message saying "OP_WITH_INVALID_USER_TYPE_EXCEPTION, Operation not valid for this user type: []". I rememebered that there is no problem to create Account records with customer portal or partner portal, even if the customer portal doesn't have create permission, since we already run the apex class in system admin mode. But why we can't do that with community user? Did anybody encounter the same problem or know how to solve this problem? Any suggestions will be helpful. Thanks in advance!!

So, we uploaded the managed package and installed it in a new org (as the clients would) but when accessing a vf page we get the error

SObject row was retrieved via SOQL without querying the requested field
 
The problem is that on the previous org everything works fine and on that VF Page we are not actually referencing any value that was the result of a query.

Any idea why this is happening?
I have a request from one of my business units to require 3 fields have a value when another field has a specific value.
IE: When case.Status_Type__c (picklist)= "BR Verified On-Site" then the following 3 fields ALL need to be populated:
MFG_Year__c (Text)
Boiler_Type__c (Picklist)
Fuel_Type__c (Picklist)


I know I can do this with 3 separate validation rules but was wondering if anyone knew how to create 1 rule that will accomodate all scenarios?

Any help would be greatly appreciated.
User-added image

I'm trying to write a couple of rules for a text field.  As per the screen cap, we would like the "Communication Preference Confirmed" text field to show "Recieved" if the "Communication Opt In Date" has a value OR if the Email Opt Out = True

or

We would also like the "Communication Preference Confirmed" text field to show "Required" if the "Communication Opt in Date"  = NULL and the "Email Opt Out" = False

Thanks!
User can login through https://shibb-idp.georgetown.edu/idp/generateAuthnRequest.jsp , but she can not login through login.salesforce.com. the error she saw is "Remote Access Client The Single Sign-On Gateway Url is invalid". She is the only one having this problem. Any idea why this happen?

I created a public site and enable it for customer community login. When I login as a community user, I need to create an Account record. But everytime when I try to create an Account record as a community user, I get the error message saying "OP_WITH_INVALID_USER_TYPE_EXCEPTION, Operation not valid for this user type: []". I rememebered that there is no problem to create Account records with customer portal or partner portal, even if the customer portal doesn't have create permission, since we already run the apex class in system admin mode. But why we can't do that with community user? Did anybody encounter the same problem or know how to solve this problem? Any suggestions will be helpful. Thanks in advance!!

I have built a trigger on an object that updates fields on a related object.  This related object has many validation rules in place that are causing issues in building test data in my test class for this trigger.  My current approach is to create the needed test data in the correct manner to allow the validation rules to pass.  However, this means that if these rules change in the future, the test class might likewise also need to be updated.  In an effort to produce development that is low-maintainence in nature, flexible, and adaptable to changes, I would prefer to not use this approach.

 

Does anyone have any best practices or guidance on ways to write APEX tests that would remove the dependence on the validation rules?  The way I see it, the validation rules shouldn't cause my APEX tests to fail, as they would not indicate any defects in the APEX code itself, but the test data being generated.  Therefore, should we exclude these rules and leave the testing of them to System or Functional User testing?

 

The only solution I have come up with so far is to create a hidden "isTest" checkbox on the object with the validation rules.  This check box would be used in the rules to exclude records having this flag True.  This flag would only get set by my test class, and therefor circumvent the rules.  I'm sure there is some flaw in this approach that I am not thinking of, but am not sure.