You need to sign in to do that
Don't have an account?
anup-prakash
and I am receiving Not Serializable: System.XmlStreamWriter
Not Serializable: System.XmlStreamWriter
global class BatchJSToWorkdayOfferSync implements Database.Batchable<sObject>, Database.Stateful, Database.AllowsCallouts{ global String xmlStringxmlRes; global System.XmlStreamWriter xmlW; global Database.QueryLocator start(Database.BatchableContext BC){ xmlW= new System.XmlStreamWriter(); xmlW.writeStartDocument('utf-8','1.0'); String query = ' My QUERY'; return Database.getQueryLocator(query); } global void execute(Database.BatchableContext BC, List<myObject> myObjectList){ } global void finish(Database.BatchableContext BC){ xmlW.writeEndDocument(); //Close XML document xmlStringxmlRes = xmlW.getXmlString(); System.debug('The XML :'+xmlW.getXmlString()); xmlW.close(); //sendEmail(xmlStringxmlRes); }
and I am receiving Not Serializable: System.XmlStreamWriter
It will work