You need to sign in to do that
Don't have an account?
Jarosław Kołodziejczyk
How to access Field Service - Service Appointment object from SOQL?
Hi,
Is it possible to access Field Service Lightning (Managed Package) - Service appointment object from SOQL?
I've tried [SELECT Id, Name FROM FSL__Service_Appointment];
[SELECT Id, Name FROM FSL__ServiceAppointment];
[SELECT Id, Name FROM FSL__Service_Appointment__c];
and plethora of other ways, but i always get:
"sObject type 'FSL__ServiceAppointment__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names."
Is it possible to access Field Service Lightning (Managed Package) - Service appointment object from SOQL?
I've tried [SELECT Id, Name FROM FSL__Service_Appointment];
[SELECT Id, Name FROM FSL__ServiceAppointment];
[SELECT Id, Name FROM FSL__Service_Appointment__c];
and plethora of other ways, but i always get:
"sObject type 'FSL__ServiceAppointment__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names."
Represents an appointment to complete field service work for a customer. This object is available in API version 38.0 and later.
Please edit your class and change the version to 38.0
Let us know if this will help you
All Answers
It should be like below i guess
[SELECT Id, Name FROM FSL__ServiceAppointment__c];
Thing is when i go to Managed Package components it's not visible on the list (couple other objects as well), could it be that salesforce denies access to these objects?
Or
1) https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_serviceappointment.htm
Then try like below
And with this line i'm getting : "sObject type 'ServiceAppointment' is not supported."
I'll try to find time tomorrow, and if you will also have a spare moment, we can try this.
https://workbench.developerforce.com/login.php
Step1 :- Login on workbench with above step
Step2 :- Then select SOQL Query then search your object in Object
Step 3:- Then select the field it will give your query like below
Let us know if this will help you
Here's code:
public with sharing class ServiceAppointmentSignController {
@AuraEnabled
public static ServiceAppointment[] getData(string recId) {
return [SELECT Id FROM ServiceAppointment ];
}
}
and error:
Result: [OPERATION FAILED]: classes/ServiceAppointmentSignController.cls: sObject type 'ServiceAppointment' is not supported. (Line: 5, Column: 16)
Represents an appointment to complete field service work for a customer. This object is available in API version 38.0 and later.
Please edit your class and change the version to 38.0
Let us know if this will help you