Create a XML file from a trigger - sql

Here is the situation, I need to create a XML file every time a specific field from the table gets updated to "C" or "L". The Xml file needs to be like this:
<?xml version="1.0" standalone="yes"?>
<DATAPACKET Version="2.0">
<METADATA>
<FIELDS>
<FIELD attrname="ID_COMAND" fieldtype="string" WIDTH="20" />
<FIELD attrname="EVENT" fieldtype="string" WIDTH="1" />
</FIELDS>
<PARAMS />
</METADATA>
<ROWDATA>
<ROW RowState="4" ID_COMAND="3721" EVENT="C" />
</ROWDATA>
</DATAPACKET>
It's been very hard to find a way to do this, help me please.

Related

Possible DB.TOXML bug? (UniVerse 11.3.1 on AIX)

Based on my understanding of the XMAP specification relative to DB.TOXML, the following XMAP represents a simple object model containing two child tables with the same parent table.
The command DB.TOXML CUST_ACT.XML XMAP_CustomerActivity.XML produces an XML file containing the records and fields from the parent table and one of the child tables as expected. However, the fields for each record of the other child table are repeated once within the record node. If I switch the child TableMaps, in the parent TABLECLASSMAP, the problem switches to the other child table.
It appears that when more than one (child) TableMap is specified in the parent map, fields from the table in the child map referenced by the first (child) TableMap entry are repeated TableMap times in record nodes of that table. This behavior was noticed during development of a process in a real-world UniVerse database environment with a more involved object model.
In order to confirm, I created simple CUSTOMER / CONTACT, CUSTOMER / ORDER files with a few test records for demonstration purposes. If this is a bug versus an XMAP configuration error on my part, then it appears either the XMAPCreate() API function or the XMAPAppendRec() API function may not correctly support this structure.
XMAP:
?xml version="1.0" encoding="UTF-8"?>
<!-- DOCTYPE U2XMAP SYSTEM "U2XMAP.DTD" -->
<U2XMAP version="1.0" Name="XMAP1" >
<!-- Table/Class map XCLASS_CLASS -->
<TABLECLASSMAP MapName="M1" StartNode="/Customers/Customer" TableName="CUSTOMERTBL">
<ColumnMap Node="CustKey" Column="CKEY"/>
<ColumnMap Node="Name" Column="CNAME" />
<TableMap Node="Orders/Order" MapName="M2" />
<TableMap Node="Contact/Methods" MapName="M3" />
</TABLECLASSMAP>
<TABLECLASSMAP MapName="M2" StartNode="Orders/Order" TableName="ORDERTBL">
<ColumnMap Node="CustKey" Column="C.KEY" />
<ColumnMap Node="OrderKey" Column="#ID" />
<ColumnMap Node="OrderDate" Column="ORDERDATE" />
<ColumnMap Node="ProductId" Column="PRODUCTID" />
</TABLECLASSMAP>
<TABLECLASSMAP MapName="M3" StartNode="Contact/Methods" TableName="CONTACTMETHTBL">
<ColumnMap Node="CustKey" Column="C.KEY" />
<ColumnMap Node="ContactKey" Column="#ID" />
<ColumnMap Node="Type" Column="TYPE" />
<ColumnMap Node="Address" Column="ADDRESS" />
</TABLECLASSMAP>
<RelatedTable>
<MapParentKey TableName="CUSTOMERTBL" Column="CKEY" KeyGenerate="No" />
<MapChildKey TableName="ORDERTBL" Column="CKEY" />
</RelatedTable>
<RelatedTable>
<MapParentKey TableName="CUSTOMERTBL" Column="CKEY" KeyGenerate="No" />
<MapChildKey TableName="CONTACTMETHTBL" Column="CKEY" />
</RelatedTable>
</U2XMAP>
RESULT:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<Customers>
<Customer>
<CustKey>1</CustKey>
<Name>MOUSE, MICKEY</Name>
<Orders>
<Order>
<CustKey>1</CustKey>
<OrderKey>10</OrderKey>
<OrderDate>01-04-2022</OrderDate>
<ProductId>555R3232</ProductId>
<CustKey>1</CustKey>
<OrderKey>10</OrderKey>
<OrderDate>01-04-2022</OrderDate>
<ProductId>555R3232</ProductId>
</Order>
<Order>
<CustKey>1</CustKey>
<OrderKey>1</OrderKey>
<OrderDate>12-27-2021</OrderDate>
<ProductId>5323423</ProductId>
<CustKey>1</CustKey>
<OrderKey>1</OrderKey>
<OrderDate>12-27-2021</OrderDate>
<ProductId>5323423</ProductId>
</Order>
<Order>
<CustKey>1</CustKey>
<OrderKey>2</OrderKey>
<OrderDate>12-28-2021</OrderDate>
<ProductId>9299399</ProductId>
<CustKey>1</CustKey>
<OrderKey>2</OrderKey>
<OrderDate>12-28-2021</OrderDate>
<ProductId>9299399</ProductId>
</Order>
<Order>
<CustKey>1</CustKey>
<OrderKey>3</OrderKey>
<OrderDate>12-29-2021</OrderDate>
<ProductId>23492349</ProductId>
<CustKey>1</CustKey>
<OrderKey>3</OrderKey>
<OrderDate>12-29-2021</OrderDate>
<ProductId>23492349</ProductId>
</Order>
</Orders>
<Contact>
<Methods>
<CustKey>1</CustKey>
<ContactKey>1</ContactKey>
<Type>HOMEPH</Type>
<Address>444-555-6666</Address>
</Methods>
<Methods>
<CustKey>1</CustKey>
<ContactKey>2</ContactKey>
<Type>HOMEST</Type>
<Address>580 LIBERTY CIR</Address>
</Methods>
</Contact>
</Customer>
<Customer>
<CustKey>2</CustKey>
<Name>FROG, KERMIT</Name>
<Orders>
<Order>
<CustKey>2</CustKey>
<OrderKey>4</OrderKey>
<OrderDate>12-29-2021</OrderDate>
<ProductId>99338822</ProductId>
<CustKey>2</CustKey>
<OrderKey>4</OrderKey>
<OrderDate>12-29-2021</OrderDate>
<ProductId>99338822</ProductId>
</Order>
<Order>
<CustKey>2</CustKey>
<OrderKey>5</OrderKey>
<OrderDate>12-28-2021</OrderDate>
<ProductId>23874771</ProductId>
<CustKey>2</CustKey>
<OrderKey>5</OrderKey>
<OrderDate>12-28-2021</OrderDate>
<ProductId>23874771</ProductId>
</Order>
</Orders>
<Contact>
<Methods>
<CustKey>2</CustKey>
<ContactKey>3</ContactKey>
<Type>HOMEPH</Type>
<Address>777-888-9999</Address>
</Methods>
<Methods>
<CustKey>2</CustKey>
<ContactKey>4</ContactKey>
<Type>WORKPH</Type>
<Address>909-090-0909</Address>
</Methods>
</Contact>
</Customer>
<Customer>
<CustKey>3</CustKey>
<Name>BIRD, BIG</Name>
<Orders>
<Order>
<CustKey>3</CustKey>
<OrderKey>6</OrderKey>
<OrderDate>12-30-2021</OrderDate>
<ProductId>83776632</ProductId>
<CustKey>3</CustKey>
<OrderKey>6</OrderKey>
<OrderDate>12-30-2021</OrderDate>
<ProductId>83776632</ProductId>
</Order>
<Order>
<CustKey>3</CustKey>
<OrderKey>7</OrderKey>
<OrderDate>12-30-2021</OrderDate>
<ProductId>R29898W9</ProductId>
<CustKey>3</CustKey>
<OrderKey>7</OrderKey>
<OrderDate>12-30-2021</OrderDate>
<ProductId>R29898W9</ProductId>
</Order>
<Order>
<CustKey>3</CustKey>
<OrderKey>8</OrderKey>
<OrderDate>12-31-2021</OrderDate>
<ProductId>23884888</ProductId>
<CustKey>3</CustKey>
<OrderKey>8</OrderKey>
<OrderDate>12-31-2021</OrderDate>
<ProductId>23884888</ProductId>
</Order>
<Order>
<CustKey>3</CustKey>
<OrderKey>9</OrderKey>
<OrderDate>12-29-2021</OrderDate>
<ProductId>29993999</ProductId>
<CustKey>3</CustKey>
<OrderKey>9</OrderKey>
<OrderDate>12-29-2021</OrderDate>
<ProductId>29993999</ProductId>
</Order>
</Orders>
<Contact>
<Methods>
<CustKey>3</CustKey>
<ContactKey>5</ContactKey>
<Type>HOMEPH</Type>
<Address>405-040-5040</Address>
</Methods>
</Contact>
</Customer>
</Customers>
Any ideas? Thanks in advance. UniVerse 11.3.1 on AIX.
I also posted this question here but haven't gotten much exposure. (where you can better see highlighted in red the repeated entries).
Looks like it might be a bug to me. I tested it under Linux with 11.3.2 and I noticed the same behavior. It may be a system limitation, but if that were the case I would expect a failure on the mapping call as it seems to be pretty particular.
I would open a ticket with Rocket. I used the HS.SALES demo data that comes with UniVerse to replicate. I will provide it here for you to use in your report. It will be much easier for support to either confirm the bug or tell you what we are collectively doing wrong if they are already working with the same data.
<?xml version="1.0" encoding="UTF-8"?>
<!-- DOCTYPE U2XMAP SYSTEM "U2XMAP.DTD" -->
<U2XMAP version="1.0" Name="XMAP1" >
<!-- Table/Class map XCLASS_CLASS -->
<TABLECLASSMAP MapName="M1" StartNode="/Customers/Customer" TableName="CUSTOMER">
<ColumnMap Node="CustID" Column="#ID"/>
<ColumnMap Node="FirstName" Column="FNAME"/>
<ColumnMap Node="LastName" Column="LNAME" />
<ColumnMap Node="State" Column="STATE" />
<ColumnMap Node="ProductID" Column="PRODID" />
<TableMap Node="States/State" MapName="M2" />
<TableMap Node="Products/Product" MapName="M3" />
</TABLECLASSMAP>
<TABLECLASSMAP MapName="M2" StartNode="States/State" TableName="STATES">
<ColumnMap Node="StateName" Column="NAME" />
</TABLECLASSMAP>
<TABLECLASSMAP MapName="M3" StartNode="Products/Product" TableName="PRODUCTS">
<ColumnMap Node="Price" Column="LIST" />
<ColumnMap Node="Description" Column="DESCRIPTION" />
</TABLECLASSMAP>
<RelatedTable>
<MapParentKey TableName="CUSTOMER" Column="PRODID" KeyGenerate="No" />
<MapChildKey TableName="PRODUCTS" Column="PRODID" />
</RelatedTable>
<RelatedTable>
<MapParentKey TableName="CUSTOMER" Column="STATE" KeyGenerate="No" />
<MapChildKey TableName="STATES" Column="CODE" />
</RelatedTable>
</U2XMAP>
In the mean time if you are blocked and the mapping isn't overly complex you can probably just add I-Descriptors and TRANS (or XLATE) over to the other file to include it in parent dictionary and thus not require any additional table mapping.
Good Luck,

Use values of the elements as XPath expression to extract another elements using XSLT 1.0

Suppose there is such a document:
<?xml version="1.0" encoding="utf-8" ?>
<root>
<paths>
<item>
<name>username</name>
<path>user/name</path>
</item>
<item>
<name>useremail</name>
<path>concat(user/name,': ',user/email)</path>
</item>
</paths>
<user>
<name>John</name>
<email>john#gmail.com</email>
</user>
</root>
the output required to obtain such a document:
<?xml version="1.0" encoding="utf-8"?>
<results>
<item name="username" value="John"/>
<item name="useremail" value="John: john#gmail.com"/>
</results>
The point is that the number of path elements can vary, and their values can refer to different elements of the source document (including using functions).
Is there a way to use the values of some elements as an expression of the search for other?

Mule - CSV Lookup Table

I have a mule flow with DataMapper configuration to map XML to JSON, in that I have a requirement to Lookup a CSV file which contains, for example, two columns and four rows to map to one of the JSON output field.
Below are my sample CSV file contents:
Name,Contact
Ram,111-222
Kumar,222-333
John,333-444
I got below exception while running DataMapper:
Element [CSV:CSV]-Pre-Execution of lookup table [CSV:CSV]failed
Error when parsing record #2 field Name
Caused by: java.lang.RuntimeException: Parsing error: Unexpected record delimiter, probably record has too few fields.
When the CSV file contains only one row there is no exception.
Could any one provide me a way to solve the issue? Thanks in advance.
EDIT: Please find the DataMapper configuration
<mule>
<data-mapper:config name="XML_To_JSON_1" transformationGraphPath="xml_to_json_1.grf" doc:name="XML_To_JSON" />
<flow name="mule-csv-lookupFlow1" doc:name="mule-csv-lookupFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="9090" doc:name="HTTP" />
<data-mapper:transform config-ref="XML_To_JSON_1" doc:name="XML To JSON" />
</flow>
</mule>
Below is the .grf file
<?xml version="1.0" encoding="UTF-8"?><Graph __version="3.5.0" author="pradeep" created="Wed Dec 03 13:06:48 IST 2014" description="XML To JSON" guiVersion="3.4.4.P" id="1417593604462" licenseCode="Unlicensed" licenseType="Unknown" modified="Wed Dec 03 13:06:48 IST 2014" modifiedBy="pradeep" name="XML_To_JSON" preview-file="${Project_Home}/src/main/resources/employee.xml" revision="1.0" showComponentDetails="false">
<Global>
<Metadata __index="0" __referenceCounter="1" __sourcePath="{}/object/contact" _dataStructure="SINGLE_DIMENSIONAL_COLLECTION" _id="__id" _metadataParentId="4430d2fe-5b06-4e39-b259-492c325fe164" _parent_id="__parent_id" _type="Output" id="f11ab87d-ec49-4034-a277-1e96a57b7925">
<Record fieldDelimiter="," name="contact" recordDelimiter="\n\\|\r\n\\|\r" type="delimited">
<Field __artificialType="_parent_id" __systemManaged="true" name="__parent_id" type="string"/>
<Field __artificialType="_id" __systemManaged="true" name="__id" type="string"/>
<Field __index="0" __sourcePath="{}/object/contact/name" containerType="SINGLE" label="name" name="name" type="string"/>
<Field __index="1" __sourcePath="{}/object/contact/phone" containerType="SINGLE" label="phone" name="phone" type="string"/>
</Record>
</Metadata>
<Metadata _type="Lookup" id="963db4af-a7a1-428c-be6b-39af261e93d4">
<Record fieldDelimiter="," name="CSV" recordDelimiter="\n\\|\r\n\\|\r" type="delimited">
<Field containerType="SINGLE" label="firstname" name="firstname" size="10" type="string"/>
<Field containerType="SINGLE" eofAsDelimiter="true" label="phone" name="phone" size="10" type="string"/>
</Record>
</Metadata>
<Metadata __index="0" __referenceCounter="1" __schemaType="employeeType" __sourcePath="{}/employees/employee" _dataStructure="SINGLE_DIMENSIONAL_COLLECTION" _id="__id" _metadataParentId="80f1c157-e81d-439d-afa8-e475de2dfe36" _parent_id="__parent_id" _type="Input" id="019cda9c-1078-4d00-bdcc-f81a59df5292">
<Record fieldDelimiter="," name="employee" recordDelimiter="\n\\|\r\n\\|\r" type="delimited">
<Field __artificialType="_parent_id" __systemManaged="true" name="__parent_id" type="string"/>
<Field __artificialType="_id" __systemManaged="true" name="__id" type="string"/>
<Field __index="0" __schemaType="employeeType" __sourcePath="{}/employees/employee/#firstname" containerType="SINGLE" label="firstname" name="firstname" type="string"/>
<Field __index="1" __schemaType="employeeType" __sourcePath="{}/employees/employee/#lastname" containerType="SINGLE" label="lastname" name="lastname" type="string"/>
<Field __index="2" __schemaType="employeeType" __sourcePath="{}/employees/employee/#gender" containerType="SINGLE" label="gender" name="gender" type="string"/>
<Field __index="3" __schemaType="employeeType" __sourcePath="{}/employees/employee/#phone" containerType="SINGLE" label="phone" name="phone" type="string"/>
<Field __index="4" __schemaType="employeeType" __sourcePath="{}/employees/employee/#text()" containerType="SINGLE" label="text()" name="text" type="string"/>
</Record>
</Metadata>
<Metadata __filteredMetadata="false" __index="0" __referenceCounter="1" __schemaType="employeesType" __sourcePath="{}/employees" _dataStructure="OBJECT" _id="__id" _type="Input" id="80f1c157-e81d-439d-afa8-e475de2dfe36">
<Record fieldDelimiter="," name="employees" recordDelimiter="\n\\|\r\n\\|\r" type="delimited">
<Field __artificialType="_id" __systemManaged="true" name="__id" type="string"/>
</Record>
</Metadata>
<Metadata __index="0" __referenceCounter="1" __sourcePath="{}/object" _dataStructure="OBJECT" _id="__id" _type="Output" id="4430d2fe-5b06-4e39-b259-492c325fe164">
<Record fieldDelimiter="," name="object" recordDelimiter="\n\\|\r\n\\|\r" type="delimited">
<Field __artificialType="_id" __systemManaged="true" name="__id" type="string"/>
</Record>
</Metadata>
<LookupTable fileURL="D:/1_Ram/DEV/Workspace/mule-workspace/mule-datamapper-lookup/src/main/resources/staff.txt" id="CSV" key="phone" metadata="963db4af-a7a1-428c-be6b-39af261e93d4" name="CSV" type="simpleLookup">
<attr name="lookupType"><![CDATA[CSV]]></attr>
</LookupTable>
<Dictionary>
<Entry id="DictionaryEntry0" input="true" name="inputPayload" output="false" type="object"/>
<Entry id="DictionaryEntry1" input="false" name="outputPayload" output="true" type="object"/>
</Dictionary>
</Global>
<Phase number="0">
<Node enabled="enabled" guiName="Foreach 'employees' -> 'object'" guiX="460" guiY="20" id="FOREACH_EMPLOYEES_OBJECT" transformClass="com.mulesoft.datamapper.transform.MelRecordTransform" type="REFORMAT">
<attr name="melScript"><![CDATA[//MEL
//START -> DO NOT REMOVE
output.__id = input.__id;
//END -> DO NOT REMOVE
]]></attr>
</Node>
<Node enabled="enabled" guiName="Foreach 'employee' -> 'contact'" guiX="460" guiY="120" id="FOREACH_EMPLOYEE_CONTACT" transformClass="com.mulesoft.datamapper.transform.MelRecordTransform" type="REFORMAT">
<attr name="melScript"><![CDATA[//MEL
//START -> DO NOT REMOVE
output.__id = input.__id;
output.__parent_id = input.__parent_id;
//END -> DO NOT REMOVE
output.phone = input.phone + (isnull(lookup("CSV").get([input.firstname])) ? null : lookup("CSV").get([input.firstname]).phone);
output.name = input.lastname + ' ' + input.firstname;]]></attr>
</Node>
<Node cacheInMemory="true" charset="UTF-8" enabled="enabled" fileURL="dict:outputPayload" guiName="JSON WRITER" guiX="900" guiY="20" id="JSON_WRITER0" type="JSON_WRITER">
<attr name="mapping"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<object xmlns:clover="http://www.cloveretl.com/ns/xmlmapping" clover:inPort="0">
<clover:collection clover:name="contact">
<item clover:inPort="1" clover:key="__parent_id" clover:parentKey="__id">
<name>$1.name</name>
<phone>$1.phone</phone>
</item>
</clover:collection>
</object>]]></attr>
<attr name="__isJsonSchema"><![CDATA[false]]></attr>
<attr name="_data_format"><![CDATA[JSON]]></attr>
<attr name="jsonSchemaURL"><![CDATA[./src/main/resources/contacts.json]]></attr>
</Node>
<Node charset="UTF-8" dataPolicy="strict" enabled="enabled" fileURL="dict:inputPayload" guiName="XML READER" guiX="20" guiY="20" id="XML_READER0" type="XML_READER">
<attr name="xmlSchemaURL"><![CDATA[./src/main/resources/employees.xsd]]></attr>
<attr name="mapping"><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Context outPort="0" sequenceField="__id" xpath="/employees">
<Context generatedKey="__parent_id" outPort="1" parentKey="__id" sequenceField="__id" xpath="employee">
<Mapping cloverField="firstname" trim="true" xpath="#firstname"/>
<Mapping cloverField="lastname" trim="true" xpath="#lastname"/>
<Mapping cloverField="gender" trim="true" xpath="#gender"/>
<Mapping cloverField="phone" trim="true" xpath="#phone"/>
<Mapping cloverField="text" trim="true" xpath="text()"/>
</Context>
</Context>
]]></attr>
<attr name="_data_format"><![CDATA[XML]]></attr>
<attr name="__rootGlobalElementName"><![CDATA[employees]]></attr>
</Node>
<Edge debugMode="true" fromNode="FOREACH_EMPLOYEES_OBJECT:0" guiBendpoints="" id="Edge1" inPort="Port 0 (in)" metadata="4430d2fe-5b06-4e39-b259-492c325fe164" outPort="Port 0 (out)" toNode="JSON_WRITER0:0"/>
<Edge debugMode="true" fromNode="FOREACH_EMPLOYEE_CONTACT:0" guiBendpoints="" id="Edge3" inPort="Port 1 (in)" metadata="f11ab87d-ec49-4034-a277-1e96a57b7925" outPort="Port 0 (out)" toNode="JSON_WRITER0:1"/>
<Edge debugMode="true" fromNode="XML_READER0:0" guiBendpoints="" id="Edge0" inPort="Port 0 (in)" metadata="80f1c157-e81d-439d-afa8-e475de2dfe36" outPort="Port 0 (out)" toNode="FOREACH_EMPLOYEES_OBJECT:0"/>
<Edge debugMode="true" fromNode="XML_READER0:1" guiBendpoints="" id="Edge2" inPort="Port 0 (in)" metadata="019cda9c-1078-4d00-bdcc-f81a59df5292" outPort="Port 1 (out)" toNode="FOREACH_EMPLOYEE_CONTACT:0"/>
</Phase>
</Graph>
I noticed the following issues in your .grf file:
1. CSV Record fields are firstname and phone while in your actual csv file they are Name and Contact (I assume the CSV sample in your original post matches what in staff.txt file).
2. LookupTable key is phone while you lookup based on name in your phone mapping lookup("CSV").get([input.firstname]).phone

CRM 2011 Custom SQL based report error after change default filters

I have some report in SQL (with pre-filtering).
I import this report to CRM (Dynamics CRM 2011) and run - everything is ok.
But when I changed default filter for this report in CRM and save - report is not run anymore (report error).
I download and checked this two files (before change default filters and after change that) and problem is that when I changed filters, crm insert into link-entity (xml 'join' node) some alias which is GUID. When I change this alias (in rdl file) from GUID to 'ab' for example and reimport this report to CRM, it is work again - until someone change default filter...
So what I shold to do ? Because now it is impossible to give users possibility to change default filter for report in CRM.
edit:
Mostly whole xml for .rdl file is the same for both reports. Only difference is in CustomProperty node. In this node is definition for defualt filter.
Section from work report width default filters without any changes:
<CustomProperty>
<Name>Custom</Name>
<Value>
<MSCRM xmlns="mscrm">
<ReportFilter>
<ReportEntity paramname="P1">
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="sc_accountevents">
<all-attributes />
<filter type="and">
<condition attribute="modifiedon" operator="last-x-days" value="30" />
</filter>
</entity>
</fetch>
</ReportEntity>
<ReportEntity paramname="P2">
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="businessunit">
<all-attributes />
<filter type="and">
<condition attribute="modifiedon" operator="last-x-days" value="30" />
</filter>
</entity>
</fetch>
</ReportEntity>
<ReportEntity paramname="P3">
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="account">
<all-attributes />
<filter type="and">
<condition attribute="modifiedon" operator="last-x-days" value="30" />
</filter>
</entity>
</fetch>
</ReportEntity>
</ReportFilter>
</MSCRM>
</Value>
</CustomProperty>
Section from broken report (after change default filters):
<CustomProperty>
<Name>Custom</Name>
<Value>
<MSCRM xmlns="mscrm">
<ReportFilter>
<ReportEntity paramname="P1" displayname="Account Events">
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="sc_accountevents">
<all-attributes />
<link-entity name="account" from="accountid" to="sc_klientid" visible="false" link-type="outer" alias="a_58cc568ca7ece311896000155d68d9dc">
<attribute name="sc_jednostkabiznesowaid"/>
</link-entity>
<link-entity name="systemuser" from="systemuserid" to="owninguser" alias="ae">
<filter type="and">
<condition attribute="businessunitid" operator="eq-businessid"/>
</filter>
</link-entity>
</entity>
</fetch>
</ReportEntity>
<ReportEntity paramname="P2" displayname="Jednostki biznesowe">
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="businessunit">
<all-attributes />
</entity>
</fetch>
</ReportEntity>
<ReportEntity paramname="P3" displayname="Klienci">
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="account">
<all-attributes />
</entity>
</fetch>
</ReportEntity>
</ReportFilter>
</MSCRM>
</Value>
</CustomProperty>
And again work report with changed default filters but with edit alias in link-entity node:
<CustomProperty>
<Name>Custom</Name>
<Value>
<MSCRM xmlns="mscrm">
<ReportFilter>
<ReportEntity paramname="P1" displayname="Account Events">
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="sc_accountevents">
<all-attributes />
<link-entity name="account" from="accountid" to="sc_klientid" visible="false" link-type="outer" alias="ab">
<attribute name="sc_jednostkabiznesowaid"/>
</link-entity>
<link-entity name="systemuser" from="systemuserid" to="owninguser" alias="ae">
<filter type="and">
<condition attribute="businessunitid" operator="eq-businessid"/>
</filter>
</link-entity>
</entity>
</fetch>
</ReportEntity>
<ReportEntity paramname="P2" displayname="Jednostki biznesowe">
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="businessunit">
<all-attributes />
</entity>
</fetch>
</ReportEntity>
<ReportEntity paramname="P3" displayname="Klienci">
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="account">
<all-attributes />
</entity>
</fetch>
</ReportEntity>
</ReportFilter>
</MSCRM>
</Value>
</CustomProperty>
Ok.
Probably no way to do something with this.
It's a bug which is remove in rollup 17 (2 months ago)...

How to trigger checkboxes with XFDF

Here is what I have:
<?xml version="1.0" encoding="UTF-8"?>
<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
<fields>
<field name="text1">
<value>First Last</value>
<field name="checkbox1">
<value>yes</value>
</field>
<field name="checkbox2">
<value></value>
</field>
<ids original="xxxxx" modified="1331062234" />
<f href="http://example.com/test.pdf" />
</xfdf>
The text value gets entered in the PDF, but I can't figure out how to get the checkboxes to recognize that they are checked.
<input type="checkbox" name="checkbox_name" value="yes" />
The xfdf value entry needs to match the checkbox value:
<field name="checkbox_name">
<value>yes</value>
</field>