You need to sign in to do that
Don't have an account?
bharathsdsd kumar
Batchlass help needed
Hi ,
I am trying to write a batch class for the following the below condition
Please create a new batch class for M2M_Activation_Status__c object. Below is the logic that is needed.
- Query records where Order Number(Order_Number__c) is not blank and Activation complete(Activation_Complete__c) is false
Kindly help me with the code pls
Thanks in Advance
I am trying to write a batch class for the following the below condition
Please create a new batch class for M2M_Activation_Status__c object. Below is the logic that is needed.
- Query records where Order Number(Order_Number__c) is not blank and Activation complete(Activation_Complete__c) is false
Kindly help me with the code pls
Thanks in Advance
global class YOUR_BATCHCLASSNAME implements Database.Batchable<sObject>{ global Database.QueryLocator start(Database.BatchableContext BC){ String quer= 'select id from M2M_Activation_Status__c where Order_Number__c != null and Activation_Complete__c = true '; return Database.getQueryLocator(query); } global void execute(Database.BatchableContext BC, List<sObject> scope){ //Put your logic here. } global void finish(Database.BatchableContext BC){ } } -Thanks
For more information -https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_batch_interface.htm
http://blog.shivanathd.com/2013/01/how-to-write-batch-class-in.html
-Thanks
Ashlekh Gera
I have done the code
Actually my need is
For the retrieved records we need to create a XML request in below format to send to BizTalk.
Request Format:
<soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" Id="Body">
<sfd:SFDCCheckStausReqResp xmlns:sfd="http://SFDCtoVIPM2MActivation" xmlns:sfd1="http://SFDCtoVIPBizServices.SFDCBizServicesSchema">
<sfd1:POSBizServices>
<POSBizServiceHeader>
<userId>WUSER</userId>
<password>2013Testing</password>
<clientId>31</clientId>
<action>CHECKSTATUS</action>
<responseFormat>XML</responseFormat>
</POSBizServiceHeader>
<request>
<checkStatus></checkStatus>
<refNum>1234455</refNum> This is order number that should be passed
</request>
</sfd1:POSBizServices>
</sfd:SFDCCheckStausReqResp>
</soapenv:Body>
Kindly help me how to pare the xml request in the format above
Thanks in advance
BizTalk should have provided you an WSDL to invoke their service, you have to generate stubbs using this wsdl and invoke their service.
It is not required to manually generate the xml, the request object in the wsdl will do it for you.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_wsdl2apex.htm