• fgwarb_dev
  • NEWBIE
  • 30 Points
  • Member since 2010
  • Salesforce.com Developer

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 4
    Likes Given
  • 6
    Questions
  • 46
    Replies
I'm trying to log the fact that a file has been downloaded out of a Salesforce Content Library.  This has been working for awhile, but one of our testers just managed to make it throw the error in the title "File already uploaded, please change title to proceed".

I can't find this error message documented anywhere, but it seems to occur if you have two contentversion records in the same library with the same name.  This shouldn't be an issue IMO since I was using the update and/or upsert command (upsert was matching against the ID field).

However, following the instruction and changing the title of the document in conjunction with the update call solved the problem.  So, future readers, just do as the error message suggests and change the title. 

We've had this happening for awhile, but it's now just started to spread to other systems.

 

We have VF buttons that execute Apex actions which result in record creation.  Sometimes (un-reproducably), a user clicking on a button will result on the Apex Action firing multiple times, creating duplicate or triplicate records.

 

From all of the testing and research that's been done my best guess is that it's a latency/lag issue.  Maybe the browser is POSTing the form until it gets a ACK from Salesforce, and Salesforce is receiving the POSTs but the ACKs aren't making it back to the browser in time???

 

If you can't tell, I'm grasping at straws.  I've posted no code, because of the time I've personally spent digging through it I've found nothing.  HELP???

We're integrating our portals (Salesforce & External portals) and want to deliver content inside Salesforce to the external portal.

 

So we've setup SAML SSO to provide a seamless data access.

 

 

However, I've just checked to ensure that our users (customer & partner portal users) can still use the traditional login URLs to gain access to the systems and not been able to login.

 

(a la: https://tapp0.salesforce.com/secur/login_portal.jsp?orgId=xyz&portalId=xyz)

 

The error returned is "Your company's Single Sign-On configuration is invalid. Please contact the administrator at your company for more information."

 

How do we configure Salesforce to allow both SAML login AND "traditional" login?

I'm looking for something like this:

Schema.CurrentUser.Opportunity.getDefaultRecordType();

 

Thanks!

 

I've got a VisualForce page on tapp0 that when i put <apex:form></apex:form> on it i get our favorite "Insufficient Privileges" error.

 

Remove the tag and the page renders!

 

Any insight?

I have a class which is not using the with sharing modifier.

 

I need to ensure that people aren't enabled to delete opportunities they shouldn't.

 

All of the people who aren't supposed to delete opportunities share a profile, and the Delete CRUD setting is switched off.

 

 

How do I query the CRUD to determine if the current user is enabled to delete an Opportunity?

 

I know about how to determine current context access to deletion:

 

if(!Opportunity.sObjectType.getDescribe().isDeletable()){
 //current context does not permit opportunity deletion.
}

 

 

but since we aren't using the with sharing modifier, this won't work.... Help?

 

I am creating a visualforce email template that needs to include the case thread id in it so end users are able to reply. 

I am reading that I should be using {!Case.Thread_Id} but when I use this, I get the following error: Unknown property 'core.email.template.EmailTemplateComponentController.Case' 

If I change this to {!relatedTo.Thread_Id} then I get Invalid field Thread_Id for SObject Case


Can someone please help me on this?    I would assume if I was using default templates that SalesForce could actually just input the ThreadID for me as it is an option on the Case > Settings options page but since were using custom VF templates, this wont work.

 

VF Code

---{!subTypeIdToFormId[subType.Id] != subType.Id}---<br />
---{!subTypeIdToFormId[subType.Id]}---<br />
---{!subType.Id}---<br />

 VF Output

---true---
---a0qK0000001GhxGIAS---
---a0qK0000001GhxGIAS---

 

Variable definitions:

Apex:
public map<Id, Id> subTypeIdToFormId {get; set;}
public map<Id, Custom_Object__c[]> typeIdToSubTypes {get; set;}
public Id typeId {get; set;} 

VF:
<apex:repeat value="{!typeIdToSubTypes[typeId]}" var="subType" >

 

Hi,

Can some one help me on this by explaining the reasons:

 

Given the following Force.com page markup and assuming the controller and each extension include an action method named “go,” which class method will be invoked when the user clicks on the commandButton?
A. theController
B. ext1
C. ext2
D. ext3

 

-Kaity

  • July 18, 2013
  • Like
  • 0

Hello everyone,

 

We are trying to use the new API Salesforce made available during Winter '13: Test.setMock.

We followed the documentation, but encountered the following issue that we were unable to resolve: a System.CalloutException, complaining that we had "uncommitted work pending".

 

Of course we do, our testmethod starts by setting up some Test Data that's necessary for the test to work, and that includes inserting and updating data.

In an actual execution, there would be no data creation, as the data would already be present. Actually doing the callout doesn't raise the Uncomitted work pending exception, so the Test Data really is at fault.

 

We did use Test.startTest() and Test.stopTest() to differentiate Test Data creation from Test Execution but this (as expected) didn't work.

We also tried some hacks, including the System.runAs(new User( Id = UserInfo.getUserId()){} that had, in the past, allowed us to circumvent "Mixed DML operations". This didn't work either.

 

We considered using the Test.loadData method, but we're inserting related objects and couldn't figure out a clean enough way to make it work (maybe we should try using ExternalID's?).

 

 

For the moment, our workaround is to modify the class generated from the WSDL, adding a if (Test.isRunningTest()) {} else {}, but that means we have to modify the autogenerated code, which is suboptimal.

 

 

Did anyone try to use this new API and run into the same issue? How did you solve it?

The basic question: Is Jitterbit Data Loader for Salesforce a better data loader than Apex Data Loader?

The deciding factors for us would be performance, stability, ease of configuration, and vendor support

I am looking for insight from someone who has used both and would like to get your opinion about which one you prefer and why

This is how we use Apex Data Loader today...
- Bulk Load .csv files into the cloud
- Insert, Update, Upsert, Delete, Export
- Called via Shell script from SSIS

A key feature of the Apex data Loader that makes it work for us today is this:
The ability to edit the "config.properties" file

For example...
We have found it necessary to tweak the following settings on an object by object, operation by operation basis to achieve the required level of performance and still stay within Salesforce API usage metering limits:
dataAccess.writeBatchSize
dataAccess.readBatchSize
sfdc.loadBatchSize
sfdc.extractionRequestSize

Does Jitterbit allow for this same level of configuration?

Thank you in advance for any insight you can offer!

Hi All,

 

I am creating a SAML assertion for the Salesforce SSO. I used OPEN SAML for creating the assertion.

Used keytool to create the certificates.

 

I am getting the following error when I validate my SAML response against the SAML validator in Salesforce 

 

11. Validating the Signature
  Is the response signed? false
  Is the assertion signed? true
  Is the correct certificate supplied in the keyinfo? true
  An exception was thrown on signature validation: java.security.SignatureException: Signature encoding error
  Certificate specified in settings: CN=dev.comityworks.com Expiration: 21 Oct 2012 07:15:05 GMT
  Certificate specified in this assertion: CN=dev.comityworks.com Expiration: 21 Oct 2012 07:15:05 GMT

 

The SAML Response is below

 

<samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" Version="2.0" IssueInstant="2012-07-20T06:5:17.364Z" Destination="https://login.salesforce.com">
<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">dev.com
</saml:Issuer>

<samlp:Status xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
<samlp:StatusCode xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
Value="urn:oasis:names:tc:SAML:2.0:status:Success">
</samlp:StatusCode>
</samlp:Status>

<saml:Assertion xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="1234" IssueInstant="2012-07-20T06:5:17.364Z" Version="2.0">

<saml:Issuer>dev.com</saml:Issuer>

<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<Reference URI="#1234">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>Xz8bJqroWKcnrUzBypQy87Z3fNU=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>
RjZ6JDl3HpFw+Jy8t19tKG9E0ED0cN7Xr7Ax56sPjSQaEFT9nSsM7NonzK6C/DHzJe63Jnv4+rXg
ZFjcTrfzlXSwGkcUREyTgLM4vOjBEz459bBcWVEMuMPUUXDOpCrdP3lSSuhrBzzEb3SXOlma8+lg
qf7WUrxv1z6VswxQEgzIwsObZNWshQ5LWuysw5txdN/8vmOgvlG+9X2PTP+K+dBEolPiRvscnj/K
vDWHueO7NU2AmVEKR0Lv3F7CJC/cY21xRAoyIILoAcUj+8sXkUI4jwib/Ik2T9+jYKN6+ZmTFo9k
cdcSXKlXNEt1jROC+YeZXaalkxY7yo8Dey/GvA==
</SignatureValue>
<KeyInfo>
<X509Data>
<X509Certificate>
MIIC2zCCAcOgAwIBAgIEWXZOdjANBgkqhkiG9w0BAQUFADAeMRwwGgYDVQQDExNkZXYuY29taXR5
d29ya3MuY29tMB4XDTEyMDcyMzA3MTUwNVoXDTEyMTAyMTA3MTUwNVowHjEcMBoGA1UEAxMTZGV2
LmNvbWl0eXdvcmtzLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKccqicXXmPX
DuqQWGWRgoUz+aqMGGhKyJVQ9XOn4a+AigweNI3GncY40yaO6GtqUjzxp7XeGCqhEG+KDP41NalK
e2QrOxGuSa6WVgomZ5txukw8B9sSJKFkJOFe+wwDW+X4rLeELMG8suAivfsr359aU9QOL4XP7GlL
G+h5/92BR3LTfe9nKjlyAgHH3KfgrXWydgK31jOeZnsBFmPKI8Qyyzyji/qeyfkC3/N+9a49L4Me
Oc960JyZdiv8lmQp+5H7ysPkqAwDGtPF6swai9i1PHe17KtsMLTQVlXQtG4L55keQ5WXGvmbjkJO
jkBY485IC9st39ZHWmPsqs51FmkCAwEAAaMhMB8wHQYDVR0OBBYEFAb7nCXQ8qZg7xEAWyH1VI/C
aRYTMA0GCSqGSIb3DQEBBQUAA4IBAQB0XDtB86sHDdm8W+BmTQvmZMF/CmI2g+URKdPPIyjy0YKc
oZ4o7F9lup+ns7cq/NkuBNCBprbKth6XN/mNDsHCxqDfykCryKQjTWFcj1KBY1of0+I225uO8mff
jKDpoENIHenvXXj82W3IKdl+tggJZar9A7SzOdtwUi4uBhA1v9gFl1Xo4+w8tIrlyV7s5/K+yLSr
S1I1USDw8lxIfWpcAza5Oshh0yN/uDURVTzr5P38E0UUbkT74J4brL6EM+TpGpZ6FGsC4YVgIcUo
NywNAeL2Dp/608Npus8HSyFefVE08xDY2q5jMFDIQSrvTp/ga7HctnikRcbU05QVxcty
</X509Certificate>
</X509Data>
</KeyInfo>
</Signature>

<saml:Subject>
<saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient" >sachin@cloudsquads.com
</saml:NameID>

<saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
<saml:SubjectConfirmationData NotOnOrAfter="2013-07-20T05:23:17.364Z" Recipient="https://login.salesforce.com"/> </saml:SubjectConfirmation>
</saml:Subject>

<saml:Conditions NotBefore="2012-07-20T05:23:17.364Z" NotOnOrAfter="2013-07-20T05:23:17.364Z">

<saml:AudienceRestriction>

<saml:Audience>https://saml.salesforce.com</saml:Audience>

</saml:AudienceRestriction>

</saml:Conditions>

<saml:AuthnStatement AuthnInstant="2012-07-20T06:5:17.364Z" SessionIndex="1234"><saml:AuthnContext><saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml:AuthnContextClassRef></saml:AuthnContext></saml:AuthnStatement></saml:Assertion></samlp:Response>

 

Hi All,

 

Following is the error that i have been facing 

"System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element".

i have the class defined for the element being pointed out in the above error. And also i dont have any invalid types in the wsdl like <s:any .... . So can you please let me know if there are any such  points that needs to be checked?

 

Thanks

Srikanth

Hi,

 

I've written a test that creates a new user using the system admin profile. I select the proflie with this query in my test 

 

Profile p = [SELECT Id,Name FROM Profile WHERE Name='System Administrator'];

 

The problem is that if the running user is not english the profile name is different. So if I change my language setting and run the same test I get List has no rows for assignment to SObject because the Name is now 'Administrador del sistema'. So my question is, how can I select the standard System Administrator profile in my test in a way that is language independent? I thought I might be able to use the license key but the key is the same for all standard profile licenses. 

 

Thanks for any help!

Hi

 

I have written an inbound email handler service to process data stored in a text file attachment in the email. When I test the functionality by sending the email from my outlook client with the attached text file, the email handler reads the subject matter and body and processes the attached text document correctly.

 

However when a database application creates the email with a data attachment and sends it to the same salesforce address, the email subject matter and body is read correctly but Salesforce doesnt find any email attachments. No exceptions are being raised. The database application also sends a copy of the email to my email account so I can verify that the attachment is present and correct. When I try to forward the email copy from my outlook client to salesforce, the email handler still dosnt find any attachments. However if I compose a new email from my outlook client and paste the text file attachment from the email copy into the new message and then send that to salesforce, the email handler finds the attachment and processes it .

 

Has anyone else experienced this problem ?

 

Thanks

Is there any way to access Content Workspace Members through the API. I need to get a list of memebers for a specified Workspace.

Is it something like this?

 

// every 5 minutes
String sch = '0 5 * * * ? ';

 

I need to push a single file of size 250MB to Content Folder using the Java API, but while trying to do this I got a error message mentioned below:

 

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Client</faultcode><faultstring>Maximum size of request reached. Maximum size of request is 52428800 bytes.</faultstring></soapenv:Fault></soapenv:Body></soapenv:Envelope>

 

Can someone please help how can I overcome this limitation.  I need this to work as the business requirement.

 

Thanks

Rohit

I am using Apex Data Loader 17.0.

Is there a way to upload data into SFDC using Data Loader without specifying the column names/header in the input csv data file?

This is a knowledge repository sort of posting.  No help is needed.  I put it here because it would have been nice to find it when I was trying to figure out what was happening.

 

If you're coding Apex in Eclipse and you make a change to an Object via the Salesforce UI and you forget to refresh the Object in your Eclipse workspace, you may get a message with this obscure reference to a MetadataELAdapter which I presume has something with Metadata elements.

 

In my case I was passing an instance of the object to a constructor of another class.  There may be other circumstances which give rise to this message, but that's what I was trying to do and I couldn't understand why it was failing.  Note, that it compiled fine, and the VF page started up fine, etc.  I ran into this in the Controller constructor where I was pre-loading data.

 

So, just refreshing the Object in Eclipse clears it all up.  Unclear to me why the state of the Eclipse object should effect code that's being uploaded and then compiled on the server, but...

 

Either way, I hope this saves someone some time.  Steve.

 

 

Does anyone have any simple ways of decoding quoted-printable emails within an Apex class.

 

Some emails that we receive are in the form:

 

 This is a multi-part message in MIME format. ------_=_NextPart_001_01C9D327.CEE8F1C3Content-Type: text/plain;      charset="us-ascii"Content-Transfer-Encoding: quoted-printable 

*1X4=20Z68F=20MFD7=20QYBZ

 

=20

 

=20

 

Some, are not depending on the mail client.

 

Thanks in advance,

 

Warren

Has anyone had success in calling Salesforce metadata API functions from Apex code? We tried just simply importing the metadata WSDL using the auto-import functionality, but there was a namespace conflict.

Is this possible? Any suggestions would be most apprecaited. Right now, we're looking at putting java code on a separate webserver to programatically update the metadata of a number of orgs. We'd really like to package some code up that would update it from within the app.

Thanks!
  • January 15, 2009
  • Like
  • 0
The Inbound Email object doesn't decode MIME-Header encoded subject lines if they use spaces (instead of underscores, as the spec demands).

So this subject line:

=?UTF-8?Q?My_Company=E2=84=A2?=

Will be received by Email Services and parsed correctly into "My Company™"

But the same subject line is not decoded if it uses a space instead of a _:

=?UTF-8?Q?My Company=E2=84=A2?=

So the Apex code that processes the email is presented with the encoded format, instead of the proper decoded content.


While this is strictly correct behavior per the spec (RFC 2047), it doesn't fit the real world.  In particular, GMail uses spaces instead of underscores ... so any email sent from GMail (or Google Apps) that has an encoded subject line won't be decoded by Email Servies.

Many other RFC 2047 decoders (eg, Perl's Encode::MIME::Header) are tolerant of spaces in the encoded-text.


(Salesforce support - I created case 02325915 to track this issue).


Message Edited by jhart on 12-25-2008 01:05 PM
  • December 25, 2008
  • Like
  • 1

Hi

 

I have written an inbound email handler service to process data stored in a text file attachment in the email. When I test the functionality by sending the email from my outlook client with the attached text file, the email handler reads the subject matter and body and processes the attached text document correctly.

 

However when a database application creates the email with a data attachment and sends it to the same salesforce address, the email subject matter and body is read correctly but Salesforce doesnt find any email attachments. No exceptions are being raised. The database application also sends a copy of the email to my email account so I can verify that the attachment is present and correct. When I try to forward the email copy from my outlook client to salesforce, the email handler still dosnt find any attachments. However if I compose a new email from my outlook client and paste the text file attachment from the email copy into the new message and then send that to salesforce, the email handler finds the attachment and processes it .

 

Has anyone else experienced this problem ?

 

Thanks

I am using Apex Data Loader 17.0.

Is there a way to upload data into SFDC using Data Loader without specifying the column names/header in the input csv data file?

Does anyone have any simple ways of decoding quoted-printable emails within an Apex class.

 

Some emails that we receive are in the form:

 

 This is a multi-part message in MIME format. ------_=_NextPart_001_01C9D327.CEE8F1C3Content-Type: text/plain;      charset="us-ascii"Content-Transfer-Encoding: quoted-printable 

*1X4=20Z68F=20MFD7=20QYBZ

 

=20

 

=20

 

Some, are not depending on the mail client.

 

Thanks in advance,

 

Warren

The Inbound Email object doesn't decode MIME-Header encoded subject lines if they use spaces (instead of underscores, as the spec demands).

So this subject line:

=?UTF-8?Q?My_Company=E2=84=A2?=

Will be received by Email Services and parsed correctly into "My Company™"

But the same subject line is not decoded if it uses a space instead of a _:

=?UTF-8?Q?My Company=E2=84=A2?=

So the Apex code that processes the email is presented with the encoded format, instead of the proper decoded content.


While this is strictly correct behavior per the spec (RFC 2047), it doesn't fit the real world.  In particular, GMail uses spaces instead of underscores ... so any email sent from GMail (or Google Apps) that has an encoded subject line won't be decoded by Email Servies.

Many other RFC 2047 decoders (eg, Perl's Encode::MIME::Header) are tolerant of spaces in the encoded-text.


(Salesforce support - I created case 02325915 to track this issue).


Message Edited by jhart on 12-25-2008 01:05 PM
  • December 25, 2008
  • Like
  • 1