2

I have some case statuses which belong to a certain process (process A) and others which belong to a different process, (process B). All of which are case processes.

How can I use remote object to get just those which belong to process A?

2
  • You mean support process? Mar 27, 2016 at 13:11
  • yes, that's what I mean.
    – eyal83
    Mar 27, 2016 at 14:54

1 Answer 1

0

Note that in SFDC every support process is linked to a record type .So this means you will query for all cases falling under those record type only .

var ct = new RemoteObjectModel.Case();
ct.retrieve( 
{ where: { 
    RecordTypeId: {IN: ['id1','id2']}, 
  }
  limit: 1 
},  

function(err, records) { 
    if (err) { 
        alert(err); 
    } else { 
        console.log(records.length); 
        console.log(records[0]); 
    } 
 } 
);

.Every Support process is created as a record in the BusinessProcess Object .Recordtype has a field called BusinessProcessId

Hence query for necessary support process first from the BusinessProcess object and then query related recordtypes related to the business process

9
  • one support process can be linked to more than one record type. Each records type is linked to one support process. That said I think eyal83 is trying to get the case status values that correspond to process A only.
    – gorav
    Mar 27, 2016 at 16:32
  • @gorav: I am trying to get all the case statuses associated with a specific process.
    – eyal83
    Mar 27, 2016 at 18:44
  • You will need to query first business process object then record type object and then case records ..hope that helps . Mar 27, 2016 at 18:54
  • @mohith I don't believe querying the record type object can get you the status values for the record type. It looks like querying business process object might do the trick but not familiar w it. developer.salesforce.com/docs/atlas.en-us.api.meta/api/…
    – gorav
    Mar 27, 2016 at 19:23
  • You have to query both ..first query business process and then next based on business process query records typeid Mar 27, 2016 at 19:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .