• Bhup_Indore
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 7
    Replies

I got this error after Parsing

 

Apex Generation Failed

Unable to find Schema type for return

 

 

xmlns:s="http://www.w3.org/2001/XMLSchema"

<part name="return" type="s:string"/>

 

 

 

i have a  custom  object called accotOpporuntunities__c , it is haveing 2 record types : accountRecordtype and Opportunitiesrecordtype 
and  accountOpportunities__C is child to accounts and opportuities objects,
  i have created a visualforce page ,in that if selected account object  in that accotOpporuntunities__c selects accountRecordtype  pickup and
    if selected opportuities object  in that accotOpporuntunities__c selects Opportunitiesrecordtype pickup and if i select accotOpporuntunities__c  object it vl need to ask for record type selection, 
my vf page is appended for new and edit buttons in page by checking skip record type,
now if created record directly from accotOpporuntunities__C object ,it is not asking recordtypes selection, with out selecting record type record is not saving in visual force page

  Can any one help how to handle record types in this page
Thanks to all
Hi 

I have go through some website and collect some template for Legder balance.but in VF page to design this very difficult.How to design this...User-added image

 

Would be interested on thoughts or links to articles on best practice for apex controllers. My feeling is that they should be as lightweight as possible delegating the functionality to a set of business objects they call. 

when i insert dates in 2 fields,it should display all the records/names created  between that dates. but what have given the query ,it is accepting that dates, manually if i enter in date fields its not accepting, i know something error in query,it would be great if anyone help in this issue?

 

<apex:page controller="MyController1">
<apex:form >
<apex:pageBlock title="Date Fields">
<apex:pageBlockSection >
<apex:inputText value="{!acc1.dj__c}"/>
<apex:inputText value="{!acc1.releaving_date__c}"/>
<apex:commandButton action="{!go}" value="go" immediate="false"/>
<apex:dataList value="{!acc}" var="acc1" >
{!acc1.name}
</apex:dataList>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

////////////////////////////////controller////////////////////

public class MyController1
{
public Task DateInput {get;set;}
public LIST<hods__c> acc{get; set;}
public hods__c acc1{get; set;}

public MyController1()
{
DateInput = new Task();
acc = new LIST<hods__c>();
acc1 = new hods__c();
}

public void go()
{
acc=[Select name from hods__c where dj__c = LAST_N_YEARS:2 and releaving_date__c <= TODAY ];

system.debug('11111111111111111'+ acc);
}
}

When i run a test class, i get this error. However Debug logs show that this is not null.

How can i get rid of this errr in my test class.

 

Message:

System.QueryException: List has no rows for assignment to SObjectClass.

 

Stack Trace:

controllerA.ProcessApprovalDecision: line 72, column 1 Class.TEST_controllerA.testREJECT: line 637, column 1

 

 

 


14:15:36.313 (45313579000)|USER_DEBUG|[70]|DEBUG|ROOOOOOVVVV:a1wS000000057H5IAI


14:15:36.313 (45313852000)|SOQL_EXECUTE_BEGIN|[71]|Aggregations:0|select Engagement_Country_Status__c from Supplier_Engagement_Country__c where ID = :tmpVar1


14:15:36.335 (45335362000)|SOQL_EXECUTE_END|[71]|Rows:1


14:15:36.335 (45335487000)|USER_DEBUG|[73]|DEBUG|Retrieved: On-Boarding

  • September 19, 2012
  • Like
  • 0

Hello Support,

I am using below code for sending emails.I need to send bulk Email from Salesforce.but here I am facing Error with
Too many future calls: 11
Can you please let me know how can I send multiple request in a single http.send() method.

 //send the email
    @future (callout=true)
     public static void SendElasticEmailBulk(String userName, String APIKey, String fromEmail,
        String fromName, String subject,list<String> lstEmailWithMessage)  {
        Http http = new Http();
        for(string strEmailMessage :lstEmailWithMessage){
            string[] arrSplitResult = strEmailMessage.split('#',2);
           
            HttpRequest req = new HttpRequest();
            HTTPResponse res;
            req.setEndpoint('https://api.elasticemail.com/mailer/send')
;
            req.setMethod('POST');  
          
            try {    
                //Construct the data
                String data = 'userName=' + userName;
                data += '&api_key=' + APIKey;   
                data += '&from=' + fromEmail;
                data += '&from_name=' + fromName;
                data += '&subject=' + EncodingUtil.urlEncode(subject, 'UTF-8');
                data += '&body_html=' + EncodingUtil.urlEncode(arrSplitResult[1], 'UTF-8');
                data += '&reply_to='+Label.Inbound_Email;
                data += '&to=' + arrSplitResult[0];//Email Address
       
                req.setBody(data);
                http.send(req);
            }
           
            catch(Exception e) {
                Alert.Emailmessage('Error on Execption'+string.valueOf(e));           
            }
        }