• Ramu goswami 1
  • NEWBIE
  • 5 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies
Hi All,

I am not able to complete Apex Specialist Super Badge Chlallenge, getting this error "Challenge Not yet complete... here's what's wrong:  The Case object has not been renamed to 'Maintenance Request'." but I have already renamed the tab names because we cannot change the API name we can only change the lables.

Please help me in this.

Thanks in Advance,
Javeed Shaik

error

Hi all,

I need a new field on Opportunity to handle an External ID.  Having looked at existing Custom Fields on my Opp, I have found one called Order_ID__c, which doesn't appear to have been used to date and fits my purpose.

I executed the following in the Query Editor in Developer Console for the Live environment:

SELECT Count(Id) FROM Opportunity WHERE Order_ID__c != null
and got the following response:
 
[object Object]: Count(Id) FROM Opportunity WHERE Order_ID__c != null ^ ERROR at Row:1:Column:41 No such column 'Order_ID__c' on entity 'Opportunity'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

When I execute this in Query Editor in my Sandbox for the same Org, I successfully receive a Query Result (0).  Any idea why this is happening?

Many thanks!
Hi all,

I'm stuck in the Apex Integration Services - Apex SOAP Callouts challenge with the following message "The Apex class 'ParkLocator' does not appear to be calling the SOAP endpoint.".

Could you please advise ?
to insert multiple contacts for Account Simutaneously.
when i click save button it shows this error
System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Last Name]: [Last Name]
Error is in expression '{!save}' in component <apex:commandButton> in page baskartask2

Class.AccAndCons1.save: line 41, column 1

<apex:page standardController="Account" extensions="AccAndCons1">
  <apex:form >
   <apex:pageBlock >
    <apex:pageBlockSection title="AccountInfo" columns="1">
     <apex:inputText value="{!Account.name}" label="Name"  />
    </apex:pageBlockSection>
    <apex:pageBlockSection title="conatctInfo" columns="2" >
    <apex:pageBlockTable value="{!wrappers}" var="wrapper" id="wtTable">
    <apex:column headerValue="S.NO">
    <apex:outputText value="{!wrapper.iden}"/>
    </apex:column>
     <apex:column headerValue="FirstName">
            <apex:inputField value="{!wrapper.con.FirstName}"/>
         </apex:column>
         <apex:column headerValue="LastName">
            <apex:inputField value="{!wrapper.con.FirstName}"/>
         </apex:column>
    </apex:pageBlockTable>
    </apex:pageBlockSection>
    <br></br>
    <apex:commandButton value="Add Row" action="{!addRows}" rerender="wtTable">
         <apex:param name="addCount" value="1" assignTo="{!addCount}"/>
      </apex:commandButton>
      <apex:commandButton value="Save" action="{!save}"/>
  
  </apex:pageBlock>
</apex:form>
</apex:page>





public with sharing class AccAndCons1 {
public list<contactWrapper> Wrappers{get;set;}
private Integer nextIdent=0;
public static Integer addCount {get; set;}
public  Account acc{get;set;}
public string name{get;set;}
public id accId{get;set;}
public list<contact> cons{get;set;}
    public AccAndCons1(ApexPages.StandardController controller) {
    this.accId=Apexpages.currentPage().getParameters().get('id');
    acc=(Account)controller.getRecord();
        wrappers=new List<contactWrapper>();
         cons=new List<contact>();
        for (Integer idx=0; idx<2; idx++)
      {
        wrappers.add(new ContactWrapper(nextIdent++));
       
      }
    }
   
    public void addRows()
   {
     for (Integer idx=0; idx<addCount; idx++)
   {
      wrappers.add(new ContactWrapper(nextIdent++));
   }
}
public PageReference save()
{


for (ContactWrapper wrap : wrappers)
  {
   wrap.AccountID=accId;
   cons.add(wrap.con);
   for(contact c:cons){
    system.debug(c.firstname);
    system.debug(c.lastname);
    }
  }
  insert cons;

  return null;
  }
public class contactWrapper{
public integer iden{get;set;}
public Contact con{get;set;}
public id AccountId{get;set;}
  public contactWrapper(integer idenent){
    iden=idenent;
    con=new contact();
  }
}
}