• Evan McDaniel
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 8
    Replies
Hi,
My first time creating a test LCC, and I'm coming up against an error I can't figure out.

The error is:
The Content Security Policy directive 'connect-src' contains 'connect-src' as a source expression. Did you mean 'connect-src ...; connect-src...' (note the semicolon)?
I've got the simplest possible container (no messaging), and a very simple React JS app, using jsForce.js to get data from SF.

Googling the error hasn't really surfaced anything helpful, so really could use some help with this.

Thanks!


 
{
"status": 1,
"name": "FIELD_INTEGRITY_EXCEPTION",
"message": "This entity is already being traced by a trace flag with a start and expiration date that overlap this trace flag's start and expiration date.: Traced Entity ID",
"exitCode": 1,
"commandName": "Create",
"stack": "FIELD_INTEGRITY_EXCEPTION: This entity is already being traced by a trace flag with a start and expiration date that overlap this trace flag's start and expiration date.
Hi all.

I'm now using Sublime Text3 with MavensMate and heard that there is eclipse force.com IDE.
If there are some other develop tools, could you please let me know and suggest me what you think the best among them.

Thanks in advance,
While MavensMate is riding off into the sunset, it's going to remain relevant for a bit.  That said, what's The Thing to use moving forward to connect VS Code, Atom, or Sublime to the Salesforce backend?

Thanks,

Steve 
The following won't validate, but won't pass the validation in this trail.  Quantity field is howver using the correct field.  Thoughts?

User-added image

<aura:component>

<aura:attribute name="item" type="Camping_Item__c" required="true"/>    
    <ui:outputText value="{!v.item.Name}"/>
    <ui:outputCheckbox value="{!v.item.Packed__c}"/>
    <ui:outputCurrency value="{!v.item.Price__c}"/>
      <ui:outputNumber value="{!v.item.Quantity}"/>
            
</aura:component>
Hello

We want to know in which environment we are when running Apex, more precisely we need to know if we are in Production, or Sandbox A, or Sandbox B, etc..

At the moment, we are looking at Org Id to determine the environment, like this :
 
public static Boolean IsProductionOrg() { // Method to check of environement is Production ORG or not
        return UserInfo.getOrganizationId() == '00ecqzecqc1IkdlUAC' ? true : false; 
    }
    
        /**
     * This method retun whether this org is a production or a sandbox
     * @return true/false
     */
    public static Boolean IsPProdOrg() { // Method to check of environement is PPROD Sandbox or not
       return UserInfo.getOrganizationId() == 'cdscddscdsccsdc'  ? true : false; 
    }

We do not like this method because everytime we refresh the Sandbox, the Org IDs of the Sandboxes change and we have to update the code.

I have found this link :
http://salesforceworld4u.blogspot.com/2015/12/how-to-get-sandbox-name-in-apex.html

It says we can look at the suffix of the logged-in user, then we can find out if it is Sandbox or Production.
For example, if logged-in user is john.smith@mycompany.com.pprod , than means environment is pprod Sandbox.

We also do not like this method because we are afraid users can change their username and remove the suffix, so method will not work anymore.

What is the clean way of doing this?