You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Export to CSV varattachment=newGlideSysAttachment();vardata="Number,Name\n"vargr=newGlideRecord('incident');gr.addQuery('active','true');gr.query();while(gr.next()){data+=gr.number+","+gr.caller_id.name+"\n";}incident=newGlideRecord('incident');incident.get('85071a1347c12200e0ef563dbb9a71c1');//Gets the record I want to attach the file toovarnewFile=attachment.write(incident,'Incidents.csv','text/csv',data);
The text was updated successfully, but these errors were encountered:
What is the post about?
Exporting to a custom CSV format
What things would help with writing the post
The text was updated successfully, but these errors were encountered: