• Xhitman
  • NEWBIE
  • 80 Points
  • Member since 2009

  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 13
    Replies

I created a custom object that i would like to trigger the creation of a Case when the object is created or updated with an open status. I found a previously writen trigger that I am using:

 

trigger CreateCase on PE_Case__c(After Update)

{

    if(Trigger.isUpdate){
        for(PE_Case__c  p: Trigger.new)

       {

          if(p.Status__c == 'Open')

          {

               Case cs = new Case();

              

                  cs.Reason = 'Internal';

 

                insert c;

          }
        
        }
    } 

}

 

Saleforce is accepting the trigger with no errors, but it is not firing.

 

Any help would be appreciated.

Hi,

 

I was wondering if we have triggers written on an object for insert/update events, is it advisable to have workflows with Field updates.

 

I was wondering checking rule criteria and then updating field based on that in Work flows, can be achived in triggers as well.

 

So why we use Workflows to update a field as updating field means again executing the triggers.

 

Please help me understanding Work flows and field updates.

 

Thanks,

Sunil

 

Hi we currently have a long text area field where users could put some comments and other details about a specific record. There are cases where user would need to put in javascript code, urls, iframe code into the comments. The problem is that content and formatting is lost whenever a comment is posted. 

This following example: 

<HEAD> <TITLE>Cool JavaScripts</TITLE> 
<SCRIPT language="JavaScript"> <!-- hide from old browsers 
alert('Welcome to my Web Site!'); 
//--> </SCRIPT> 
</HEAD>

Would turn into this: 

<SCRIPT language="JavaScript"> <!-- hide from old browsers alert('Welcome to my Web Site!'); //--> </SCRIPT>

Any suggestions that we can do? 

Should we be using the apex:inputTextArea or the apex:inputField? 

Is there a way to disable the auto-formatting?

 

We don't want to execute the script upon load but we want to preserve the formatting. Would having a rich text area help in this case? We are already using <apex:outputText escape="false" value="{!c.cmMsg.Message__c}" /> so that the content would display.

 

 

 

---------- Forwarded message ----------
From: Mail Delivery Subsystem <mailer-daemon@googlemail.com>
Date: Wed, Aug 11, 2010 at 1:51 PM
Subject: Delivery Status Notification (Failure)
To: ******@*************.com
Delivery to the following recipient failed permanently:
    **********@*************************.*********.salesforce.com
Technical details of permanent failure:

Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 552 552 Message

is too large; 10485760 bytes max (state 18).

 

I am getting the following error when using the email service via Salesforce.

 

---------- Forwarded message ----------

From: Mail Delivery Subsystem <mailer-daemon@googlemail.com>

Date: Wed, Aug 11, 2010 at 1:51 PM

Subject: Delivery Status Notification (Failure)

To: ******@*************.com

Delivery to the following recipient failed permanently:
    **********@*************************.*********.salesforce.com
Technical details of permanent failure:Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 552 552 Message is too large; 10485760 bytes max (state 18).

 

I already turned on the "Truncate Oversize Email (Text and HTML)" and this error is supposed to go to the email set in "Route Error Emails to This Email Address" right? I didn't get this email and it simply bounced the email back to the sender.

 

Any ideas? The email is not big though.. Not sure whats the problem.

 

We are currently a user of Echosign for Salesforce and we are in the process of automating the creation of echosign details with a click of a button.
What we would like is to create the Echosign's agreement record, fill up all the necessary fields, create the agreement record and then attach the document and possibly send the document to the recepient all in one go via Force.com Sites.
Everything is currently working quite well like the agreement record gets created and the attachment automatically attached but the problem is that when I try to click the "Send to Echosign", it doesn't send anything to me although the status says that it was already sent.
I tried creating one manually using the exact information inside Salesforce via the Agreemnt tab and it was able to send me the email notification that I have an agreement to sign.
Any ideas if there are any difference between creating a record manually vs. creating it via code? It seems like the Agreement tab only uses the standard Salesforce pages.
You could refer to my code below.
echosign_dev1__SIGN_Agreement__c agmt = new echosign_dev1__SIGN_Agreement__c();
agmt.Name = 'Sample Agreement';
agmt.Social_Ads_Campaign__c = currentSACId; // Custom lookup field 
agmt.echosign_dev1__Recipient__c = getselectedSAC().Delivery_Partner_Contact__c;// Contact field
agmt.echosign_dev1__RemindRecipient__c = 'Every Day, Until Signed'; 
agmt.echosign_dev1__SenderSigns__c = true;
agmt.echosign_dev1__Message__c = 'Please sign the attached Insertion Order';
agmt.echosign_dev1__SignatureType__c = 'e-Signature';
agmt.echosign_dev1__PasswordProtectSign__c = false; 
agmt.echosign_dev1__SenderSigns__c = true;           
agmt.echosign_dev1__PasswordProtectPDF__c = false;  
agmt.echosign_dev1__SignatureOrder__c = 'I sign, then the Recipient signs';
agmt.echosign_dev1__Status__c = 'Draft';
insert agmt;

 

We are currently a user of Echosign for Salesforce and we are in the process of automating the creation of echosign details with a click of a button.


What we would like is to create the Echosign's agreement record, fill up all the necessary fields, create the agreement record and then attach the document and possibly send the document to the recepient all in one go via Force.com Sites.
Everything is currently working quite well like the agreement record gets created and the attachment automatically attached but the problem is that when I try to click the "Send to Echosign", it doesn't send anything to me although the status says that it was already sent.

 

I tried creating one manually using the exact information inside Salesforce via the Agreemnt tab and it was able to send me the email notification that I have an agreement to sign.

 

Any ideas if there are any difference between creating a record manually vs. creating it via code? It seems like the Agreement tab only uses the standard Salesforce pages.


You could refer to my code below:

 

echosign_dev1__SIGN_Agreement__c agmt = new echosign_dev1__SIGN_Agreement__c();
agmt.Name = 'Sample Agreement';
agmt.Social_Ads_Campaign__c = currentSACId; // Custom lookup field 
agmt.echosign_dev1__Recipient__c 			= getselectedSAC().Delivery_Partner_Contact__c;// Contact field
agmt.echosign_dev1__RemindRecipient__c 		= 'Every Day, Until Signed'; 
agmt.echosign_dev1__SenderSigns__c			= true;
agmt.echosign_dev1__Message__c 				= 'Please sign the attached Insertion Order';
agmt.echosign_dev1__SignatureType__c 		= 'e-Signature';
agmt.echosign_dev1__PasswordProtectSign__c 	= false; 
agmt.echosign_dev1__SenderSigns__c 			= true;           
agmt.echosign_dev1__PasswordProtectPDF__c 	= false;  
agmt.echosign_dev1__SignatureOrder__c 		= 'I sign, then the Recipient signs';
agmt.echosign_dev1__Status__c 				= 'Draft';
insert agmt;

PageReference pdfPage = Page.SocialAdCampaignIOPDF;
pdfPage.getParameters().put('id', currentSACId);
Blob pdfBlob = Blob.valueOf('Sample PDF');
pdfBlob = pdfPage.getContentAsPDF();
String filename = agmt.Name + ' ' + DateTime.Now().format('MM-dd-yy') + '.pdf';
Attachment a = new Attachment(parentId = agmt.id, name=filename, body = pdfBlob, ContentType = 'application/pdf');
insert a;

 

 

I do not know why static resource call via URLFOR seems not to be supported in javascript invoke button, whereas the function is available for use.Have anyone used another method to get the url of a static resource in javascript invoke button?

Hi,

 

I use remoteFunction-calls in my visualforce pages. It turns out, that this funcionality only works in IE and FF, not in Safari.

 

It's easy to reproduce:

 

* Create a RemoteSite with Remote Site URL: "http://www.google.at"; set the Disable Protocol Security Option

* Create a Page:

 

<apex:page >
<apex:includeScript value="/soap/ajax/21.0/connection.js"/>
<apex:form >
<apex:commandButton immediate="true" action="javascript&colon;test()" onclick="test(); return false;" value="Test"/>
</apex:form>

<script type="text/javascript">
function test() {
sforce.connection.remoteFunction({
async : true,
cache : false,
requestData: 'GET /',
method: "GET",
url : 'http://www.google.at',
onSuccess : function(response) { alert('OK: '+response); },
onFailure : function(response) { alert('ERROR: '+response); }
});
}
</script>
</apex:page>

* havigate to /apex/yourpagename and click on the Test-Button

 

on FF or IE an alert is called with the contents of the google page

in Safari I get this response:

 

<html><head><title>401 Unauthorized</title></head>
<body>
<h1>401 Unauthorized</h1>
<p /><hr />
<small></small>
</body>

 

Can somebody verify that? I tested on 2 different PCs, but with the same development organisation.

 

thx

impactit

can anybody explain me what is this error.I am trying to deploy a contoller class and visualforce page into production and i am geting this error.

 

system.limit.exception:    Too many query rows 501.

Does anyone know if there's a way to force a commit during a transaction. The reason I need this is I have a method that inserts data into a custom object and I want to call getContent on a visualforce page to get some information based on the object just inserted. The problem is that the content isn't actually there yet becasue it doesn't get commited till the end of the transaction so in the getContent transaction the data doesn't exist : ( . How can I force this a commit? Also keep in mind that getContent() is not allowed in async or batch apex so those aren't an option.

 

Thanks!

Scott

I created a custom object that i would like to trigger the creation of a Case when the object is created or updated with an open status. I found a previously writen trigger that I am using:

 

trigger CreateCase on PE_Case__c(After Update)

{

    if(Trigger.isUpdate){
        for(PE_Case__c  p: Trigger.new)

       {

          if(p.Status__c == 'Open')

          {

               Case cs = new Case();

              

                  cs.Reason = 'Internal';

 

                insert c;

          }
        
        }
    } 

}

 

Saleforce is accepting the trigger with no errors, but it is not firing.

 

Any help would be appreciated.

Hi,

 

I was wondering if we have triggers written on an object for insert/update events, is it advisable to have workflows with Field updates.

 

I was wondering checking rule criteria and then updating field based on that in Work flows, can be achived in triggers as well.

 

So why we use Workflows to update a field as updating field means again executing the triggers.

 

Please help me understanding Work flows and field updates.

 

Thanks,

Sunil

 

---------- Forwarded message ----------
From: Mail Delivery Subsystem <mailer-daemon@googlemail.com>
Date: Wed, Aug 11, 2010 at 1:51 PM
Subject: Delivery Status Notification (Failure)
To: ******@*************.com
Delivery to the following recipient failed permanently:
    **********@*************************.*********.salesforce.com
Technical details of permanent failure:

Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 552 552 Message

is too large; 10485760 bytes max (state 18).

 

I am getting the following error when using the email service via Salesforce.

 

---------- Forwarded message ----------

From: Mail Delivery Subsystem <mailer-daemon@googlemail.com>

Date: Wed, Aug 11, 2010 at 1:51 PM

Subject: Delivery Status Notification (Failure)

To: ******@*************.com

Delivery to the following recipient failed permanently:
    **********@*************************.*********.salesforce.com
Technical details of permanent failure:Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 552 552 Message is too large; 10485760 bytes max (state 18).

 

I already turned on the "Truncate Oversize Email (Text and HTML)" and this error is supposed to go to the email set in "Route Error Emails to This Email Address" right? I didn't get this email and it simply bounced the email back to the sender.

 

Any ideas? The email is not big though.. Not sure whats the problem.

 

We are currently a user of Echosign for Salesforce and we are in the process of automating the creation of echosign details with a click of a button.
What we would like is to create the Echosign's agreement record, fill up all the necessary fields, create the agreement record and then attach the document and possibly send the document to the recepient all in one go via Force.com Sites.
Everything is currently working quite well like the agreement record gets created and the attachment automatically attached but the problem is that when I try to click the "Send to Echosign", it doesn't send anything to me although the status says that it was already sent.
I tried creating one manually using the exact information inside Salesforce via the Agreemnt tab and it was able to send me the email notification that I have an agreement to sign.
Any ideas if there are any difference between creating a record manually vs. creating it via code? It seems like the Agreement tab only uses the standard Salesforce pages.
You could refer to my code below.
echosign_dev1__SIGN_Agreement__c agmt = new echosign_dev1__SIGN_Agreement__c();
agmt.Name = 'Sample Agreement';
agmt.Social_Ads_Campaign__c = currentSACId; // Custom lookup field 
agmt.echosign_dev1__Recipient__c = getselectedSAC().Delivery_Partner_Contact__c;// Contact field
agmt.echosign_dev1__RemindRecipient__c = 'Every Day, Until Signed'; 
agmt.echosign_dev1__SenderSigns__c = true;
agmt.echosign_dev1__Message__c = 'Please sign the attached Insertion Order';
agmt.echosign_dev1__SignatureType__c = 'e-Signature';
agmt.echosign_dev1__PasswordProtectSign__c = false; 
agmt.echosign_dev1__SenderSigns__c = true;           
agmt.echosign_dev1__PasswordProtectPDF__c = false;  
agmt.echosign_dev1__SignatureOrder__c = 'I sign, then the Recipient signs';
agmt.echosign_dev1__Status__c = 'Draft';
insert agmt;

 

We are currently a user of Echosign for Salesforce and we are in the process of automating the creation of echosign details with a click of a button.


What we would like is to create the Echosign's agreement record, fill up all the necessary fields, create the agreement record and then attach the document and possibly send the document to the recepient all in one go via Force.com Sites.
Everything is currently working quite well like the agreement record gets created and the attachment automatically attached but the problem is that when I try to click the "Send to Echosign", it doesn't send anything to me although the status says that it was already sent.

 

I tried creating one manually using the exact information inside Salesforce via the Agreemnt tab and it was able to send me the email notification that I have an agreement to sign.

 

Any ideas if there are any difference between creating a record manually vs. creating it via code? It seems like the Agreement tab only uses the standard Salesforce pages.


You could refer to my code below:

 

echosign_dev1__SIGN_Agreement__c agmt = new echosign_dev1__SIGN_Agreement__c();
agmt.Name = 'Sample Agreement';
agmt.Social_Ads_Campaign__c = currentSACId; // Custom lookup field 
agmt.echosign_dev1__Recipient__c 			= getselectedSAC().Delivery_Partner_Contact__c;// Contact field
agmt.echosign_dev1__RemindRecipient__c 		= 'Every Day, Until Signed'; 
agmt.echosign_dev1__SenderSigns__c			= true;
agmt.echosign_dev1__Message__c 				= 'Please sign the attached Insertion Order';
agmt.echosign_dev1__SignatureType__c 		= 'e-Signature';
agmt.echosign_dev1__PasswordProtectSign__c 	= false; 
agmt.echosign_dev1__SenderSigns__c 			= true;           
agmt.echosign_dev1__PasswordProtectPDF__c 	= false;  
agmt.echosign_dev1__SignatureOrder__c 		= 'I sign, then the Recipient signs';
agmt.echosign_dev1__Status__c 				= 'Draft';
insert agmt;

PageReference pdfPage = Page.SocialAdCampaignIOPDF;
pdfPage.getParameters().put('id', currentSACId);
Blob pdfBlob = Blob.valueOf('Sample PDF');
pdfBlob = pdfPage.getContentAsPDF();
String filename = agmt.Name + ' ' + DateTime.Now().format('MM-dd-yy') + '.pdf';
Attachment a = new Attachment(parentId = agmt.id, name=filename, body = pdfBlob, ContentType = 'application/pdf');
insert a;

 

 

http://forums.sforce.com/sforce/board/message?message.uid=168908#U168908

 

I marked this as solved because it stopped happening for my user.  However, they report (and I have confirmed) that this issue is happening again. 

 

The only changes we made today in SalesForce were to add a new profile for a completely different user.  No changes have been made to the server where the i-frames are pointing.

 

The really weird thing is, that when I am accessing this user's account via Login Access, I cannot replicate this issue.   This could point to an issue with access to the sites linked in the i-frames, but the user can access these sites normally via directly linking to them in the main browser window.

 

Any assistance would be appreciated.

Hi,

 

I have uploaded some JS script and an image to Static Resources (zipped), then included it using the includescript tag in my page, and now I want to make references to some image in there  from within JavaScript. How can I do that? i.e. what path do I use for the image?

 

The VF guide states that includescript is translated to the following HTML:

 

<script type='text/javascript' src='/resource/1233160164000/example_js'>

 But what does that long number mean? I was thinking that maybe I could use the rendered HTML to reference the image thru JS.

 

Any ideas please? Thanks!

 

Message Edited by asadim2 on 02-01-2010 06:58 PM