We’ve developed some resources to help you work effectively from home during COVID-19 Click to learn more

FYI: TicketAgent available since CRM Online 8.4 R04

Using Services86 you will be able to access the TicketAgent

There are two known bugs that will be solved in the upcoming release R05 (both Online and Onsite) which will give you an error like:

"SuperOffice.Exceptions.SoException: WCF Method failed ---> System.ServiceModel.ProtocolException: The remote server returned an unexpected response: (502) Bad Gateway. ---> System.Net.WebException: The remote server returned an error: (502) Bad Gateway."


This happens if you have a ticket status with -1 in the time_counter field or if you try to save a ticket entity (SaveTicketEntity) where the replied_at field IS NULL.


RE: FYI: TicketAgent available since CRM Online 8.4 R04

Great, looking forward to use this.

In my local 8.4 R04 I get a bunch of "Unknown NetServer exceptions" with the following code, but it works in SOD.

Since there is no Intellisense for these new classes in CRMScript it's kinda hard to work with, but here is a starting point for anyone who want to try.

#setLanguageLevel 3;

NSTicketAgent ticketAgent;

//Create a new ticket
NSTicketEntity t1 = ticketAgent.CreateDefaultTicketEntity();
t1.SetTitle("From CRMScript");
t1 = ticketAgent.SaveTicketEntity(t1);

//Add a message to it
NSTicketMessageEntity m1 = ticketAgent.CreateDefaultTicketMessageEntity();
m1.SetAuthor("I made this");
m1 = ticketAgent.SaveTicketMessageEntity(m1);

//Edit existing ticket
Integer ticketId = 74;
NSTicketEntity t2 = ticketAgent.GetTicketEntity(ticketId);
t2.SetRepliedAt(getCurrentDateTime()); //bugfix
NSTicketCategoryEntity cat;
t2 = ticketAgent.SaveTicketEntity(t2);

//Delete a ticket
ticketAgent.DeleteTicketEntity(ticketId); //Doesn't work?
Av: Frode Lillerud 19. des 2018