How to search an item object in a PX whose name contains speacial characters
I am facing an issue while searching a Document item using session.getObject.
The session.getObject is not returning any object that has special characters like apostrophe in the number
Which Agile version are you using?
with 9.3.2 the following code returns IItem 123’456 properly
session.getObject(IItem.OBJECT_TYPE, "123'456")
However, try to get the objects using an IQuery
IQuery q = (IQuery) session.createObject(IQuery.OBJECT_TYPE, "Document"); q.setCriteria("[Number] == %1",new Object[]{"123''456"});
using the double apostrohpe will looking for number 123’456
I think Single quotes are escaped by doubling them up.
try this query
q.setCriteria("[Number] == %1"
,
new
Object[]{
"123''456"
});