Ive created a platform event in salesforce and am unable to reference it in my code to trigger the event, below is my event object I have created.
The error I am receiving can be seen below
classes/InboundILOS.cls: Invalid type: ILOSRecording_Event__e (Line: 22, Column: 9)
And my code where I am trying to create the ILOSRecording_Event__c list is below.
@RestResource(urlMapping='/Widgets/*')
global with sharing class InboundILOS {
@HttpPost
global static String createILOS() {
ILOS_Intergration_Post__c w = new ILOS_Intergration_Post__c();
String requestBody = RestContext.request.requestBody.toString();
w.JSON_Response__c =requestBody;
JSON2ApexResp resp = JSON2ApexResp.parse(requestBody);
System.debug(resp.token);
w.token__c=resp.token;
w.videoURL__c=resp.videoURL;
w.embedURL__c=resp.embedURL;
w.randTag__c=resp.randTag;
w.iframe__c=resp.iframe;
List<ILOSRecording_Event__e> e = new List<ILOSRecording_Event__e>();
insert w;
return 'Upload Complete';
}