Skip to content

rokzu/PCF-FetchToSubgrid

 
 

Repository files navigation

Fetch to Subgrid

This control converts a "Multiple Lines of Text" field into a subgrid.


image


The "Multiple Lines of Text" field value can contain either a FetchXml string or a JSON string with the following format:

{
    "newButtonVisibility": true,
    "deleteButtonVisibility": true,
    "pageSize": 10,
    "fetchXml": "<fetch version=\"1.0\" output-format=\"xml-platform\" mapping=\"logical\" distinct=\"false\">\n  <entity name=\"bvr_testcase\">\n    <attribute name=\"bvr_name\" />\n    <attribute name=\"bvr_slot_title\" />\n    <attribute name=\"bvr_os_status\" />\n    <attribute name=\"createdon\" />\n    <attribute name=\"statuscode\" />\n    <attribute name=\"statecode\" />\n    <attribute name=\"ownerid\" />\n    <filter type=\"and\">\n      <condition attribute=\"bvr_os_status\" operator=\"eq\" value=\"551800000\" />\n    </filter>\n  </entity>\n</fetch>"
}

Property Description
fetchXml FetchXml query, according to which the data will be shown in the sub-grid.
pageSize Number of sub-grid lines per page.
newButtonVisibility Show or hide New button on the sub-grid.
deleteButtonVisibility Show or hide Delete button on the sub-grid.

Control has the following properties:

Name Type Required Description
Default FetchXml String Required The default FetchXml value will be used if the "Multiple Lines of Text" field value doesn't contain the "fetchXml" JSON property.
Default Page Size Number Required The default Page Size value will be used if the "Multiple Lines of Text" field value doesn't contain the "pageSize" JSON property.
New Button Visibility Boolean Required The default New Button Visibility will be used if the "Multiple Lines of Text" field value doesn't contain the "newButtonVisibility" JSON property.
Delete Button Visibility Boolean Required The default Delete Button Visibility will be used if the "Multiple Lines of Text" field value doesn't contain the "deleteButtonVisibility" JSON property.

image


FetchXml can contain:

  • FetchXML aggregate columns
  • Multiple link entities
  • Attributes of the fetch tag
  • etc.

About

This control converts a FetchXml string into a subgrid.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 97.0%
  • CSS 3.0%