Question & Answer
Question
Do Complex query work for extended columns?
Answer
Details:
When input passed to api with ComplexQuery is as below ,
Complex query does not work for extended columns:
<Organization
TotalNumberOfRecords="">
<Extn>
<ComplexQuery Operator="AND">
<Or>
<Exp Name= "ExtnRole" Value="Account"/>
<Exp Name= "ExtnRole"
Value="Account Group"/>
</Or>
</ComplexQuery>
</Extn>
</Organization>
Issues:
- The <ComplexQuery> element should not be
passed under <Extn> element.
- If Name in <Exp> element is ExtnRole,
complexquery will not work since the DB-Class generator prefix Extn_ to the
given xml name in the extension entity xml.
Solution:
- Do not
pass ComplexQuery element under <Extn> element for extended columns.
-
Prefix the Name with Extn_
For example, consider an xml name of the
following extended column definition.
<Attribute ColumnName="EXTN_ROLE"
XMLName="ExtnRole " XMLGroup="Extn" />
This xml name will be modified by
the framework as Extn_ ExtnRole.
Hence any query for extend columns (through the db-framework) should be made with the modified Extn-xml name. (w.r.t above example, use Extn_ ExtnRole instead of ExtnRole)
<Exp Name="Extn_ExtnRole" Value="ABC"/>
Sample Input:
<Organization >
<ComplexQuery >
<Or>
<Exp Name=
"Extn_ExtnRole" Value="Account"/>
<Exp Name= "Extn_ExtnRole"
Value="Account Group"/>
</Or>
</ComplexQuery>
</Organization>
Historical Number
FAQ2723
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21518734