[SOLVED] Parameter for Dynamic Field

Moderator: crythias

Locked
JoelQ
Znuny newbie
Posts: 3
Joined: 06 Jan 2014, 10:59
Znuny Version: 3.3.2

[SOLVED] Parameter for Dynamic Field

Post by JoelQ »

I am working on an Android application that create tickets for an OTRS server. Everything works fine except for a user input value that needs to be added to a dynamic field of the ticket.

Below is an example of how the values of the ticket is added (Android Java side).

Code: Select all

	request.addProperty("UserLogin", soapUsername);
				request.addProperty("Password", soapPass);
				Hashtable<String, String> ticket = new Hashtable<String, String>();
				ticket.put("Title", subject);
				ticket.put("CustomerUser", email);
				ticket.put("CustomerID", "soapwebnologin");
				ticket.put("QueueID", "3");
				ticket.put("State", "open");
				ticket.put("PriorityID", "1");
				ticket.put("Lock", "unlock");
				ticket.put("OwnerID", "2");
			
				request.addProperty("Ticket", ticket);
		
				Hashtable<String, String> article = new Hashtable<String, String>();
				article.put("Subject", subject);
				article.put("Body", complaint);
				article.put("ContentType", "text/plain; charset=utf8");
				request.addProperty("Article", article);
Now, a TelephoneNumber dynamic field is created in Ticket Settings ->Dynamic Fields (OTRS dashboard). What is the parameter for the TelephoneNumber dynamic field that should be called on the Java side? I tried the one below but it seems to be incorrect.

Code: Select all

Hashtable<String, String> ticketDynamicField = new Hashtable<String, String>();
				ticketDynamicField.put("DynamicField_TelephoneNumber", telnum);
				request.addProperty("DynamicFieldObject", ticketDynamicField);
Can anyone please enlighten me on this? Thank you in advance.
Last edited by JoelQ on 07 Jan 2014, 10:30, edited 2 times in total.
JoelQ
Znuny newbie
Posts: 3
Joined: 06 Jan 2014, 10:59
Znuny Version: 3.3.2

Re: Parameter for Dynamic Field

Post by JoelQ »

Any idea or hint that might help?
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Parameter for Dynamic Field

Post by crythias »

Not really sure ... but, given that ticket is referencing either a table or a method, and article, much the same, there isn't an analog for ticketDynamicField.

there's DynamicFieldValue and DynamicField (Kernel/System/xxxx)

viewtopic.php?f=53&t=16009#p77686
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
JoelQ
Znuny newbie
Posts: 3
Joined: 06 Jan 2014, 10:59
Znuny Version: 3.3.2

Re: Parameter for Dynamic Field

Post by JoelQ »

I found the solution.

Code: Select all

Hashtable<String, String> ticketDynamicField = new Hashtable<String, String>();
			
	ticketDynamicField.put("Name", "TelephoneNumber");
	ticketDynamicField.put("Value", telnum);
	request.addProperty("DynamicField", ticketDynamicField);
Thank you.
Locked