• mkaufman
  • NEWBIE
  • 10 Points
  • Member since 2010
  • Chief Innovation Officer
  • MK Partners, Inc.


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 14
    Replies
We have an LWC that works perfectly in all orgs.
We use Lightning Out in a VF Page to display the LWC in multiple orgs.
In only some of those orgs, we are starting to see a CORS issue due to the static resource being served by a different url than the CORS header accompanying it.
We have tried making the static resource private and public, same problem.
The problem goes away for a user, if that user goes to setup and downloads the static resource (it will still remain for other users in the org until they do so too though).

Here's the actual CORS error (sanitized for privacy) from the browser dev console:
Access to XMLHttpRequest at 'https://acme--c.visualforce.com/apex/VFPage?id=a026g00000F6SkOAAV&isdtp=p1&sfdcIFrameOrigin=https://acme.lightning.force.com' (redirected from 'https://acme--c.na174.visual.force.com/apex/VFPage?id=a026g00000F6SkOAAV&isdtp=p1&sfdcIFrameOrigin=https://acme.lightning.force.com') from origin 'https://acme--c.na174.visual.force.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Is anyone else using Delegated Authentication to Single Sign-On to Salesforce?  It was working fine for a year but stopped this weekend after our org was updated to Spring '14.  After login we are redirected to this page: https://na9.salesforce.com/_nc_external/identity/ic/ICNotNeeded  with a message stating
Activation complete  Your device has been automatically activated based upon network location.
We click Continue and are redirected to the Login page instead of being redirected to the home page!

Anyone else experience this?

We've had a fully working single sign-on from Google Apps to Salesforce for months.  This morning all of our users could not login.  The delgated authentication error history shows the following error: org.xml.sax.SAXParseException: Premature end of file.

 

We have not changed anything in our sso code that could cause this.  A search online indicates this may be a java issue.  Does anyone know if Salesforce recently got a java upgrade?

For various reasons, I'm writing Apex code that calls out to the REST API.  I'm able to authenticate, insert, query, delete, etc with no problem  Updates via the REST API require the PATCH method to be used in the HttpRequest class.  However, it seems that the HttpRequest class does not support the PATCH method.

 

Has anyone else experienced this inconsistency in across the APIs?  Has anyone figured out how to do this or a workaround?

Thanks in advance.

MK Partners is hiring Admins, Developers, and Consultants in Los Angeles who are passionate about Salesforce and the force.com Platform.  If you have the drive, creativity, and aptitude then we will provide you with the training and real world experience to make you a true Salesforce Guru.  

 

Apply today at http://www.mkpartners.com/about/careers

 

MK Partners is the fastest growing salesforce.com Implementation Partner.  We specialize exclusively in Salesforce and the force.com Platform.  Full compensation package provided including benefits.

 

Direct applicants only please.  This is a full-time W2 position located in North Hollywood, CA.

We have an LWC that works perfectly in all orgs.
We use Lightning Out in a VF Page to display the LWC in multiple orgs.
In only some of those orgs, we are starting to see a CORS issue due to the static resource being served by a different url than the CORS header accompanying it.
We have tried making the static resource private and public, same problem.
The problem goes away for a user, if that user goes to setup and downloads the static resource (it will still remain for other users in the org until they do so too though).

Here's the actual CORS error (sanitized for privacy) from the browser dev console:
Access to XMLHttpRequest at 'https://acme--c.visualforce.com/apex/VFPage?id=a026g00000F6SkOAAV&isdtp=p1&sfdcIFrameOrigin=https://acme.lightning.force.com' (redirected from 'https://acme--c.na174.visual.force.com/apex/VFPage?id=a026g00000F6SkOAAV&isdtp=p1&sfdcIFrameOrigin=https://acme.lightning.force.com') from origin 'https://acme--c.na174.visual.force.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
We have apex classes through which we send emails based on user action in force.com sites. It was working great until Friday, But yesterday when one of our customer try to submit application, they were getting error, In debug it says “SendEmail failed. First exception on row 0; first error: UNKNOWN_EXCEPTION, INVALID_TYPE: sObject type 'SalesforceIqDataSource' is not supported.: []”. I am pretty sure we did not change anything related to apex class, email template, vf page etc.. Does anyone know the reason or best way to fix this?
hey everyone, 

I m strating with Lightning components and I need to do something like this : (in Visualforce page)

<apex:inputField label="Client" value="{!Opportunity.client__c}"  style="width:70%;"/> <br/>

With lightning i tried this : 

<ui:inputSelect aura:id="client" label="client"
                                          class="slds-input"
                                          labelClass="slds-form-element__label"
                                          value="{!v.opportunity.client__c}"/>

But the list doesn't display the picklist values when its with lightning components !

Anyone can help please ? 

Thanks !
Hello, I am trying to use "force:inputField" to create type-specific input component implementation based on the data type to Create Account Record. 

Here is what I did : 

In cmp file : 

<aura:handler name="init" value="{!this}" action="{!c.doInit}" />
<aura:attribute name="account" type="Account" default="{ sobjectType: 'Account' }"/>
 <force:inputField value="{!v.account.Name}" />

In Controller :
doInit: function(component, evt, helper) {
         var action = component.get("c.getAccount");
        action.setCallback(this, function(a) {
            console.log(a.getReturnValue());
                component.set("v.account", a.getReturnValue());
            
        });
        $A.enqueueAction(action);
    },

I can see the v.account value if I use ui:inputText, so it is not the problem of javascript or apex code. I did not got any error,  only a blank page with nothing in html markup, the javascript function is not event executed. 

Please help me ! Thanks a lot 
Hi,

We have a managed package which uses Custom Settings and we are getting the exception "Row with duplicate Name at index 1" when the code is trying to pull back all of the settings - here is the code:
 
List<Our_Custom_Setting__c> settings = Our_Custom_Setting__c.getall().values();

We have seen there was a similar issue on sandboxes before but this is in a production org.

How would a duplicate have gotten in? Any idea how we can fix this? 
  • February 10, 2015
  • Like
  • 0
Is anyone else using Delegated Authentication to Single Sign-On to Salesforce?  It was working fine for a year but stopped this weekend after our org was updated to Spring '14.  After login we are redirected to this page: https://na9.salesforce.com/_nc_external/identity/ic/ICNotNeeded  with a message stating
Activation complete  Your device has been automatically activated based upon network location.
We click Continue and are redirected to the Login page instead of being redirected to the home page!

Anyone else experience this?

We've had a fully working single sign-on from Google Apps to Salesforce for months.  This morning all of our users could not login.  The delgated authentication error history shows the following error: org.xml.sax.SAXParseException: Premature end of file.

 

We have not changed anything in our sso code that could cause this.  A search online indicates this may be a java issue.  Does anyone know if Salesforce recently got a java upgrade?

Hello,

 

I have a new custom object called a 'Case Action Item' related to the Case object in a master-detail relationship.  The requirement is that whenever a new Case Action Item is created, a new CaseComment must be added to the parent Case, and this CaseComment should trigger an alert to the Contact assigned to the Case.

 

The code for the trigger is below, and it functions fine except for one detail.  The email to the Contact is not being sent.

 

I've marked the CaseComment as 'Published' and set the DMLOptions to trigger the AutoResponseEmails.  What am I missing?

 

Any assistance would be appreciated.

 

 

trigger addNewCaseComment on Case_Action_Item__c (after insert, after update) {
List<CaseComment> arrCaseComments = new List<CaseComment> ();
Map<Id,Case> mapRelatedCases = new Map<Id,Case>();
	
for (Case_Action_Item__c cai : Trigger.new)
{
	if (cai.Description__c == 'Initial Request')
		continue;
	if (Trigger.IsUpdate)
	{
		Case_Action_Item__c originalCAI = Trigger.oldMap.get(cai.Id);
		if (cai.Category__c == originalCAI.Category__c && cai.Description__c == originalCAI.Description__c)
			continue; 
	}
	mapRelatedCases.put(cai.Case__c,null);
}
if (mapRelatedCases.size() == 0)
	return;
mapRelatedCases = new Map<Id,Case>([Select Id, AccountId, Account.Name, CaseNumber, Subject from Case where Id in :mapRelatedCases.keySet()]);
for (Case_Action_Item__c cai : Trigger.new)
{
	if (cai.Description__c == 'Initial Request')
		continue;
	if (Trigger.IsUpdate)
	{
		Case_Action_Item__c originalCAI = Trigger.oldMap.get(cai.Id);
		if (cai.Category__c == originalCAI.Category__c && cai.Description__c == originalCAI.Description__c)
			continue; 
	}
	if (cai.Case__c == null || !mapRelatedCases.containsKey(cai.Case__c))
		continue;
		
	Case relatedCase = mapRelatedCases.get(cai.Case__c);
	CaseComment newCaseComment = new CaseComment(ParentId=cai.Case__c);
	newCaseComment.CommentBody = '<Comment body is set based on requirements>';
	newCaseComment.IsPublished = true;
	arrCaseComments.add(newCaseComment);
}

if (arrCaseComments.size() > 0)
{ Database.DMLOptions dlo = new Database.DMLOptions(); dlo.EmailHeader.triggerAutoResponseEmail = true; dlo.optAllOrNone = false;
	Database.SaveResult[] arrResults = Database.insert(arrCaseComments, dlo);
    // Process the results, and send an email notifying IT if any errors were encountered.
    classHelperMethods.processResults(arrResults, 'addNewCaseComment', 'Case');
}

}

 

  • February 17, 2012
  • Like
  • 0

For various reasons, I'm writing Apex code that calls out to the REST API.  I'm able to authenticate, insert, query, delete, etc with no problem  Updates via the REST API require the PATCH method to be used in the HttpRequest class.  However, it seems that the HttpRequest class does not support the PATCH method.

 

Has anyone else experienced this inconsistency in across the APIs?  Has anyone figured out how to do this or a workaround?

Thanks in advance.

I'm new at this, so please be patient.

I've been reading other threads about creating a hyperlink, using an image for a button, and I'm having problems implementing this. Here's what I'm trying to do: I have a custom object called Change Management. I'd like to create a button/hyperlink that when clicked adds this record to a shared calendar. When it creates the event on the calendar it needs to use a custom field in Change Management for start date/time and end date/time. Can anyone show me the way?

Thanks much
  • October 16, 2006
  • Like
  • 0