• TLF
  • NEWBIE
  • 146 Points
  • Member since 2008

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

Hi,

 

After updating to Summer 13' I get this error message  in my formerly FREE edition when I'm sending out emails with Outbound Emailing service: (SingleEmailMessage)

 

SINGLE_EMAIL_LIMIT_EXCEEDED, Failed to send email: []

 

I dig into it, and found this in the docs:

 

  • Single email messages sent with the sendEmail method count against the sending organization's daily single email limit.When this limit is reached, calls to the sendEmail method using SingleEmailMessage are rejected, and the user receives a SINGLE_EMAIL_LIMIT_EXCEEDED error code. However, single emails sent through the application are allowed.

So, it seems, that in my org the limit of sendig emails changed suddenly. (to around 10/day)

Does anybody have experiences with this, was this intentional? What can / shall I do now??

Thanks,

Robert

The mian goal is to set up web service which accept few parameters and based on that returns the file.

As it is my first try with webservices I do not know too much about it.

 

Input http call is GET type: https://cs8.salesforce.com/services/apexrest/RemoteActivation?company=abc&street=xyz

so parameters are passed in URL, for simplicity lets use just those two parameters.

 

I have found this article http://wiki.developerforce.com/page/Creating_REST_APIs_using_Apex_REST and followed the sample code. 

 

As a result came up with that:

@RestResource(urlMapping='/RemoteActivation/*')
global class as_remoteActivationService {
	
@HttpGet 
	global static String remoteActivation(RestRequest req, RestResponse res) {
		String company = req.params.get('company');
		String street = req.params.get('street');
				
		System.debug('COMPANY: ' + company);
		System.debug('STREET: ' + street);
		return 'Done';
	}

and error when saving:

Save error: Invalid type: HTTP GET/DELETE methods do not support parameters 

 

Now I do not understant it. Example code exacly says:

@HttpGet
  global static List<Case> getOpenCases(RestRequest req, RestResponse res) {

 and I have done the same and getting error. Why?

Ok, I feel kind of dumb asking this, but I'm trying to get double quote characters to appear in either the title or subtitle attributes of an <apex:sectionHeader>. I tried using &quot;, but that gets converted into "&#34;" in the rendered page. I also tried using the " character directly, but the Visualforce compile gets confused by the nested quotes in the title or subtitle attribute. Am I missing something obvious?

I've defined three different APEX REST endpoints (call them endpoint A, B and C). Each of these endpoints implements a GET method. I've created a Visualforce page that uses Javascript/AJAX to make calls to these REST endpoints through the AJAX proxy. Everything seems fine until I need to make HTTP GET calls to these three APEX REST endpoints in rapid succession (GET A, GET B, GET C). Analysis of the requests/responses shows that all three request are formed correctly, but the response to GET C is identical to the response for GET B. It seems like it is returning a cached response from the GET B call rather than the real response to the GET C call. If I slow things down, to allow more time in between the calls, the responses are what I would expect. Has anyone encountered anything like this?

I recently upgraded my Force.com IDE (and all projects) to the Winter '12 release. Since upgrading, I've been observing that when I attempt to run unit tests against an Apex class, it often takes a very long time to execute. Even relatively simple tests sometimes take a minute or two to complete. The time doesn't seem to be spent during test execution, but rather during the "preparing results..." phase (based on the progress indicator in the IDE). Reducing the log level doesn't seem to have any impact one way or the other. I've also seen it simply get stuck in the "preparing results..." phase to the point where I had to kill the Eclipse process. Anyone else seeing this?

Here's the Apex REST class:

@RestResource(urlMapping='/abc/def/*')
global with sharing class TheRESTclass
{
  @HttpGet
  global static String doGet(RestRequest req, RestResponse res)
  { return 'hello'; }
}

 

From the Apigee Salesforce console, I call the following URL (using OAuth authentication):

https://na7.salesforce.com/services/apexrest/abc/def

 

I've also tried it with the namespace in there:

https://na7.salesforce.com/services/apexrest/namespace/abc/def

 

But I keep getting this error:

 "message": "Could not find a match for URL /namespace/abc/def", "errorCode": "NOT_FOUND"

 

I've looked at multiple tutorials and they all guided me in the same direction. So I don't know what I could be possibly missing. Do I need to comfigure Remote Site Settings or do any other type of configuration?

 

Thanks in advance.

I am working on a project that has a very large Visualforce page.  I'm breaking it down into more manageable chunks by using a "State" object that encapsulates information about a particuar state inside of smaller objects.  The base class is abstract, and each state extends that abstract class to provide different functionality.  Anyhow, one state manages a purchase order and has a method called getPO ().  I can access that method via an Apex expression like this:

 

{!curState['PO'].PO_Number__c}

 

In that object (which works perfectly).  Obviously I cannot access the getPO() method directly because the base class does not have that method and the Controller that maintains the state object returns the abstract State obejct, I also have a method called getLineItems() that returns a collection of objects (line items on a purchase order).  The collection is a "List."  I can actually test this such as:

 

<apex:outputText value="{!curState['LineItems']}"/>

 

Which shows the collection as having the correct number of elements.

 

When I attempt to iterate over that collection in a pageBlockTable such as:

 

<apex:pageBlockTable id="lineItems" value="{!curState['LineItems']}" var="t">


it will not compile.  The error message is:

    Save error: Cannot coerce from class core.apexpages.el.adapters.RuntimeTypeMetadataELAdapter to class java.lang.Boolean

 

Perhaps I'm misunderstanding what Datatable should take in the value.  However, if I put the exact same list in the controller class, it WORKS.  Any ideas on how I can fix this?

 

Thanks in advance.

 

Hi.

 

One of my client needs to know how an Email Address is validated

by salesforce,because the same validation rule /specification should be done

with another application/system the client uses.

 

This is to balance the Email validation  specification  in both systems/application.

 

Thanks

suresh

Hi,

 

I have a pretty simple custom component that is in a managed package and deployed to an organization that has no namespace. In this case, Salesforce seem to be having an issue resolving the correct namespace. Here is the simplest way of reproducing the issue:

 

1, First create a custom page that will be the target of our button that is in our custom component:

 

<apex:page >
  <h1>Target Page</h1>
</apex:page>

 

 

2. Create a custom controller called TestController:

 

global with sharing class TestController
{

    public TestController()
    {

    }
    
    public PageReference goToNextPage()
    {
    
        return Page.test__TestNextPage__c;
    }
    
    static testMethod void runTestCases()
    {
        TestController t = new TestController();
        system.assertEquals(t.goToNextPage().getUrl(), Page.test__TestNextPage__c.getUrl());
    }   
}

 3. Now create a custom component that will use the above controller:

 

<apex:component controller="TestController" allowDML="true" access="global">
 
 <h1>Test componet</h1>
 <apex:form >
     <apex:pageBlock id="testBlock" title="Test Block" rendered="true">
     
         <apex:pageBlockButtons location="top">
            <apex:commandButton action="{!goToNextPage}" rendered="true" value="Go To Next Page" disabled="false" />
         </apex:pageBlockButtons>
     
     </apex:pageBlock>
 </apex:form>
</apex:component>

4. Now package this up as a managed package and deploy it into an ORG that has no namespace defined.

5. In the new ORG, create a new custom visualforce page that will use the packaged test component:

 

 

<apex:page >
  <h1>Test Page</h1>
 
  <test:TestComponent id="testComponent" rendered="true" />
</apex:page>

6. Now when you navigate to the page, and click on the "Go To Next Page" button you get the following error:

 

URL No Longer Exists

If you then add a namespace to the same ORG, the button starts working. Any ideas, suggestions?

 

Thanks!

 

 

 

 

Hi,

 

I'm trying to rotate text within Visualforce page that is being rendered as PDF. I've managed to rotate the text in the HTML  version of the page by applying the two browser specific CSS styles that are supported by Firefox and IE below:

 

 

-webkit-transform: rotate(90deg); -moz-transform: rotate(90deg);	

 

filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);

 

But, when I add the renderAs="PDF" attribute to the page and, the text is not rotated. Has anyone ever tried this? Does anyone know of a way to get it to work?

 

Note : Following is a small development being carried out to demystify salesforce apex webservice and callout features, please correct me if you find my understanding to be incorrect.

 

I am trying to integrate two Salesforce Orgs using Apex. Apex supports both callouts and webservices, then why not leverage both to achieve a 360 connectivity between two Salesforce instances.

 

Org1 : Create a Apex Web Service, Generate its WSDL

global class AccountPlan {

webservice String area;
webservice String region;

//Define an object in apex that is exposed in apex web service
global class Plan {
webservice String name;
webservice Integer planNumber;
webservice Date planningPeriod;
webservice Id planId;
}

webservice static Plan createAccountPlan(Plan vPlan) {

//A plan maps to the Account object in salesforce.com.
//So need to map the Plan class object to Account standard object
Account acct = new Account();
acct.Name = vPlan.name;
acct.AccountNumber = String.valueOf(vPlan.planNumber);
insert acct;

vPlan.planId=acct.Id;
return vPlan;
}

}

 

Org2:  Consume above generated WSDL to generate following Apex Class viz.,AccountPlanClasses

public class AccountPlanClasses {
public class LogInfo {
public String category;
public String level;
private String[] category_type_info = new String[]{'category','http://soap.sforce.com/schemas/class/TCSSAAS/AccountPlan','LogCategory','1','1','false'};
private String[] level_type_info = new String[]{'level','http://soap.sforce.com/schemas/class/TCSSAAS/AccountPlan','LogCategoryLevel','1','1','false'};
private String[] apex_schema_type_info = new String[]{'http://soap.sforce.com/schemas/class/TCSSAAS/AccountPlan','true','false'};
private String[] field_order_type_info = new String[]{'category','level'};
}
public class AllowFieldTruncationHeader_element {
............................
............................

 

Now lets try to connect to Org1 from Org2

AccountPlanClasses.Plan plan = new AccountPlanClasses.Plan();
plan.name = 'Chirag';
plan.planNumber = 111;
AccountPlanClasses.AccountPlan a = new AccountPlanClasses.AccountPlan();
a.createAccountPlan(plan);

 

Execution of above code runs into following error

WebService returned a SOAP Fault: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session faultcode=sf:INVALID_SESSION_ID faultactor= 

 

I to feel that somewhere I am missing User Credentials to be supplied, but I dont know exactly where. Please guide me to complete this 360 connectivity between two orgs using Apex.

Message Edited by Chirag Mehta on 05-05-2009 06:13 AM
Message Edited by Chirag Mehta on 05-12-2009 07:52 PM
I'm trying to get an actionSupport to work with a lookup field.

Code:
<apex:inputField id="adviser" value="{!claimNotification.Adviser__c}">
 <apex:actionSupport action="{!updateAdviserDetails}" event="onchange" immediate="false" status="stat" rerender="adviserEmail,adviserPhone,adviserFax" />
</apex:inputField>



It works if I type the name of the new adviser in the textbox and tab out of the field but does not work if I click the search button next to the lookup field and select a new adviser that way.

How do I trigger the actionSupport when the search button is clicked?