-
ChatterFeed
-
0Best Answers
-
1Likes Received
-
0Likes Given
-
3Questions
-
0Replies
Test class code for below trigger?
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
}
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
}
- vasu yadav
- July 24, 2017
- Like
- 0
- Continue reading or reply
whithout using data loder how to insert 60000 records into salesfore?
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
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
- vasu yadav
- November 30, 2016
- Like
- 0
- Continue reading or reply
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?
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
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
- vasu yadav
- November 30, 2016
- Like
- 1
- Continue reading or reply
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?
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
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
- vasu yadav
- November 30, 2016
- Like
- 1
- Continue reading or reply