|
|||
|
|||
I am trying to use the C# API to get the tickets assigned to users but having hard time tying the account_rec_id with ticket search. Can you please help me with this. Here's what I want.
Get all tickets assigned to Emma Thomas I believe I would first have to search the Accounts table --> what should be my search criteria on account table? ObjectQuery<Account> accountSearch = new ObjectQuery<Account>(); accountSearch.AddCriteria(Account.Fields.FileAs, OperatorEnum.opEqual, "Emma Thomas"); accountSearch.FetchObjects(Account.Fields.AccountR EC_ID.Key); I think post that, I would need to use the account_rec_id from my query above to query the tickets table? Am I right about this? ObjectQuery<Ticket> ticketSearch = new ObjectQuery<Ticket>(LinkEnum.linkAND, fetch_rcds); ticketSearch.AddCriteria(Ticket.Fields.AccountREC_ ID, OperatorEnum.opEqual, account.AccountREC_ID); ticketSearch.FetchObjects(); Last edited by mrbean26 : March 5th, 2016 at 11:02 PM. Reason: changes |