• vasu yadav
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 0
    Replies
Hi,

Could you please post the test class code for below mentioned trigger. I have tried but i am facing some issue.

public class SalesForceToProductViaTrigger {
    @future(callout=true)
    public static void SendCustomer(Id recordId){
        Account acc;
        string queryString='select Id,Name';
        Map<String,SObjectField> fmap=Schema.SObjectType.Account.fields.getMap();
        DescribeFieldResult f;
        for(SObjectField field:fmap.values()){
            f=field.getDescribe();
            if(f.isCustom()){
                queryString+=','+f.getName();
            }
        }
        queryString+=' from Account where id=\''+recordId+'\'';
        acc=(Account)Database.query(queryString)[0];
        //SalesForceToProduct.SendCustomer(acc);
        SalesForceToProduct.SendCustomerNew(acc);
    }
    @future
    public static void updateIsUpdateToFalse(Id recordId){
        update new Account(id=recordId,DTCisUpdateFromWebService__c=false);
    }

Thanks in advance
Vasu

}
Hi, I have one question,

whithout using data loder how to insert 60000 records into salesfore.

Please let me if there have any way to overcome this

Thanks in advance
Hi, I am new to salesforce and  have some confussion,
what is the exact difference between future annotation and batch class? which case we would prefer future annotation and which case we would prefer batch class?

Thnaks in advance
Hi, I am new to salesforce and  have some confussion,
what is the exact difference between future annotation and batch class? which case we would prefer future annotation and which case we would prefer batch class?

Thnaks in advance