Skip to Content
author's profile photo Former Member
Former Member

Reading value from standard field

Hello Experts,

I am relatively new in C4C and I start to learn the technical side. However I am having a problem to make a solution for this case where I need to find out whether the agent that is assigned to the service request is available or not. The availability will be determine from the schedule maintained in the appointment. If the agent is not free, then the ticket would be assigned to someone else.

My questions would be :

1. Logically I think I would have to write a method to get the processor of a ticket. How is the retrieve actually work? Is there an easy way to know which is the value of the standard field? I looked at the repository explorer and I am guessing that this is what I would need. So the main question is how would i write it so that I can get who is the ticket assigned to? The retrieve did not show me the option of the for the processor.

2. If I could retrieve the value of the ID, then I would have to read his/her appointment. Do I use association for that? How would I link everything together for now? I am currently having 1 bo only, should I extend them?

Many thanks,


processor.PNG (4.0 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Dec 11, 2015 at 09:20 AM

    Hello Martin!

    To get the processor should be something like this:

    import ABSL;

    import AP.CRM.Global;

    var ticketID = "123";

    var ticket = ServiceRequest.Retrieve(ticketID);

    var partyID = ticket.ProcessorParty.PartyKey.PartyID.content

    Once you have the partyID, in this case probably is an employeeID, you can check if there is an activity/appointment for the employee, with status open, with the same date, etc.

    You can test a query executing the Activity QueryByElements in RepositoryExplorer, once you get the expected result, there is a button to generate the code:

    import ABSL;

    import AP.PC.ActivityManagement.Global;

    var query = Activity.QueryByElements;

    var selectionParams = query.CreateSelectionParams();

    selectionParams.Add(query.PartyID, "I", "EQ", partyID);

    var resultData = query.ExecuteDataOnly(selectionParams);

    Best regards.


    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Alexandre,

      Thank you for your respond.

      I managed to find a way to read the processor by calling it inside the service request xbo, whereas i can read the schedule using the activity xbo as well. The problem is I do not know how to read both of the information I need inside 1 bo (or xbo if possible). I want to pass the information of the processor to automatically read the schedule and pass back the availability to the ticket itself.

      Many thanks,


Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.