-1

I have one custom object 'Territory__c' which have standard Field "Name" and custom field "Territory_Ex_ID__c". So what would be SOQL whole data. Suppose the user list I want to fetch with this detail included.

I am new to salesforce, so please help me with scenario.

curiousMind
  • 2,812
  • 1
  • 17
  • 38

2 Answers2

0

for fetching the field you just have to use there API names like in your example like

Select Name, Territory_Ex_ID__c from Territory__c
0
List<Territory__c> list = [Select Name, Territory_Ex_ID__c from Territory__c];
Rohit Heera
  • 2,709
  • 2
  • 21
  • 31
  • There is one thing if you want to link this with user you need to have a Lookup to user on Territory object and by Quering.List list = [Select Name, Territory_Ex_ID__c from Territory__c where user = 'userid']; – Rohit Heera Jul 15 '19 at 06:10
  • I've meant to explain it in your answer... You can edit it anytime! – FZs Jul 15 '19 at 08:07