You need to sign in to do that
Don't have an account?
msb-appsupport1.3905906418879758E12
How to search ticket based on campaign name?
Hi,
I want to search ticket number based on campagin. However, the console told me the campaing is not on the entity list of the ticket.
The code I have tried is below
sbxe1__Ticket__c[] ticket = [SELECT Name FROM sbxe1__Ticket__c WHERE campaing =:'CampaginTest'];
System.debug(ticket);
How could I search based on campaign?
Thanks.
sbxe1__Ticket__c[] ticket = [SELECT Name FROM sbxe1__Ticket__c WHERE sbxe1_sbx_Campaign__r.ID =:<pass the ID of the campaign for which you wish to pull the NAME field>'];
All Answers
sbxe1__Ticket__c Object appears to be a custom Object so i would suggest you to go through the fields present on this object - if there is no relationship between sbxe1__Ticket__c and campaign object - create one and then you will be able to filter the records on sbxe1__Ticket__c object using Campaign as a filter.
However, the selection still does not work.
Could you give me more suggestions?
Thanks.
like this:
sbxe1__Ticket__c[] ticket = [SELECT Name FROM sbxe1__Ticket__c WHERE sbxe1_sbx_Campaign__c.ID =:<pass the ID of the campaign for which you wish to pull the NAME field>'];
sbxe1__Ticket__c[] ticket = [SELECT Name FROM sbxe1__Ticket__c WHERE sbxe1__Ticket__c.sbxe1_sbx_Campaign__r.ID =:<pass the ID of the campaign for which you wish to pull the NAME field>'];
reference:
http://www.salesforce.com/us/developer/docs/dbcom_soql_sosl/Content/sforce_api_calls_soql_relationships.htm
sbxe1__Ticket__c[] ticket = [SELECT Name FROM sbxe1__Ticket__c WHERE sbxe1_sbx_Campaign__r.ID =:<pass the ID of the campaign for which you wish to pull the NAME field>'];