KVSFCYProjectGanttViewer#
Procedures#
SetData(Text, Code[20]) :#
Summary: Sets the inbound data and job number for the Project Gantt Viewer control processing. This procedure initializes the codeunit with the incoming JSON data from the control add-in and the specific job number that will be used for building the Gantt chart visualization. The inbound data typically contains commands or requests from the client-side Gantt control, while the job number identifies which project's data should be processed and displayed. This setup enables the codeunit to respond to control add-in events and generate appropriate JSON responses containing job tasks, planning lines, dependencies, and visualization data for the interactive Gantt chart interface.
procedure SetData(inbound: Text; jobNoPar: Code[20]):
Parameters:
inbound: JSON data received from the Project Gantt control add-in containing commands and parameters for processing.jobNoPar: Job number identifying the specific project for which Gantt chart data will be generated and managed.
GetData() : Text#
Summary: Retrieves the outbound data generated for the Project Gantt Viewer control. This procedure returns the JSON response that has been prepared during the processing of inbound commands from the Gantt control add-in. The outbound data contains the complete project structure including job tasks, planning lines, task dependencies, timeline information, and control labels formatted as JSON for consumption by the client-side Gantt chart visualization. This enables the interactive display of project timelines, task relationships, and milestone tracking in the user interface.
procedure GetData(): Text
Returns: JSON formatted text containing the complete project Gantt chart data structure for visualization.
EncodeURIComponent(Text) : Text#
Summary: Encodes text for safe inclusion in JSON and URI components by applying HTML encoding. This procedure ensures that special characters, HTML entities, and potentially problematic text content are properly encoded to prevent parsing errors in JSON structures and client-side processing. It handles project descriptions, task names, and other user-entered text that will be transmitted to the Gantt chart control add-in, ensuring data integrity and preventing security issues related to unescaped content. This is essential for maintaining proper JSON formatting and safe data transmission between Business Central and the interactive Gantt visualization component.
procedure EncodeURIComponent(textToEncode: Text): Text
Parameters:
textToEncode: The text content to be HTML encoded for safe JSON and URI usage.
Returns: HTML encoded text that is safe for inclusion in JSON structures and URI components.