• Adapala Kullayappa
  • NEWBIE
  • 5 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 5
    Replies
hi Friends ,


list vales are store in null values how to remove null values in list please help me


Thanks for advice

kullayappa
Hi
My scenario is to update the checkbox field if the Address field in Account is update. After 30 second of the record saved, it should uncheck the checkbox field.

Can anyone help me out to solve this issue.
Trigger throwing an error "
trigger test on Account (before update) {
list<Account> a =  new list<Account>();
Account acc = [select Id,checkboxForPopUp__c,BillingAddress,BillingCity,BillingCountry,BillingCountryCode,BillingPostalCode,BillingState,BillingStateCode,BillingStreet
                         from Account
                         where Id =:trigger.new];
if( (acc!=Null) &&
((acc.BillingAddress != trigger.oldmap.get(acc.id).BillingAddress) || (acc.BillingCity != trigger.oldmap.get(acc.id).BillingCity) ||
(acc.BillingCountry != trigger.oldmap.get(acc.id).BillingCountry) || (acc.BillingStateCode != trigger.oldmap.get(acc.id).BillingStateCode) ||
(acc.BillingStreet != trigger.oldmap.get(acc.id).BillingStreet))  
)
{
acc.checkboxForPopUp__c = TRUE;
a.add(acc);
}
update acc;
}

execution of BeforeUpdate caused by: System.DmlException: Update failed. First exception on row 0 with id 001Q00000104rDvIAI; first error: SELF_REFERENCE_FROM_TRIGGER, Object (id = 001Q00000104rDv) is currently in trigger test, therefore it cannot recursively update itself: []: Trigger.test: line 15, column 1"
Hi All, 

       I need to create Parent details into child objects using Custom Button. How to create Custom button and how to pass the values from parent to child object without Code, otherwise no problem. Plz Give me some instructions for that.
Hi All,
   i have a requirement on account to contact objects, in that in contacts object have once check box export=true , if data  have changed in  account  or contact objects then export has to be false( export =false.  ) in contact object. 
   can any one have best solution or code for it could u share with us
   
Thanks All
Hi,

I have a apex class for which i have test class for it , but its not covering any %, kindly help me on this regard

MY APEX CLASS :


public class IAR_TT_Excel_Export_Controller2 extends IarBaseController{ public string IARId {get;set;} public string GRIDId {get;set;} public IAR_Main__c objIARMain {get;set;} public string IARName {get;set;} public Decimal IARVersion {get;set;} public IAR_TT_Excel_Export_Controller2(){         IARId = ApexPages.currentPage().getParameters().get('IarMain');         GRIDId= ApexPages.currentPage().getParameters().get('id');         //EquipmentType = ApexPages.currentPage().getParameters().get('Type');           if(IARId!=null)             {                 objIARMain = [select Id, Customer_Name__c,IAR_Name__c,Version__c from IAR_Main__c where Id=:IARId LIMIT 1];                            }             IARName=objIARMain.IAR_Name__c;             system.debug('Before==>'+IARName);             IARName=IARName.replace(' ','_');             system.debug('After==>'+IARName);             IARVersion=objIARMain.Version__c;    }    }


MY TEST CLASS:

static testMethod void IAR_TT_Ramp_Controller_Test3() {
 
 //IAR_TT_Excel_Export_Controller2 iarexport  = new IAR_TT_Excel_Export_Controller2();
 
         // Add parameters to page URL
       // ApexPages.currentPage().getParameters().put('IarMain');
       
       
       IAR_Main__c iars1 = new IAR_Main__c();
       iars1.Customer_Requirements_Comments__c='check';
       iars1.Version__c=2;
       insert iars1;
      

 
 
 }

Kindly let me know what  am doing wrong here
thanks in advance
HttpRequest  req1=new HttpRequest();
    req1.setMethod('POST');
   req1.setEndpoint('https://ap1.salesforce.com/services/apexrest/MyPackageAC/ServerRestApi/0019000001N7LjKAAV?_HttpMethod=DELETE');  
    req1.setHeader('Authorization','OAuth '+access_token);
             
    HttpResponse res=p1.send(req1);
    system.debug(res);
    result=res.getBody();
=============================================================================
@RestResource(urlMapping='/ServerRestApi/*')
global class ServerResource
{

@HttpDelete
  global static void doDelete() {
        RestRequest req = RestContext.request;
        RestResponse res = RestContext.response;
        String accountId=req.requestURI.substring(req.requestURI.lastIndexOf('/')+1);
        Account account = [SELECT Id FROM Account WHERE Id = :accountId];
        delete account;
  }

}

what could be reason for this error "POST requires content-length error".