Skip to main content

2024.1.2 to 2024.2.0

1. Lookup Views: Context-based rendering on Mobile

What changed

Starting with version 2024.2.0, the system no longer forces the default lookup view on mobile devices. Instead, it evaluates the lookup-view configured in the current context.

Why it matters

The default view only shows the contentTitle. By using a context-specific view, developers can provide a richer mobile experience with fields like iconField, titleField, and subtitleField.

If no specific lookup-view is defined, the system falls back to the default view. To keep using the default, remove the lookup-view setting from the context configuration or implement a view with the ListViewTemplate.

202420_empty_viewtemplate_properties Figure: View template configuration without any properties

202420_comparison_viewtemplates_mobile Figure: Comparison between default and configured templates on mobile

warning

Make sure each mobile context defines a suitable lookup view to avoid display issues.


2. Database Requests: New "systemDBRequestWarnTimeout" option

What changed

A new system property systemDBRequestWarnTimeout is now available in addition to systemDBRequestTimeout.

Why it matters

After the specified systemDBRequestWarnTimeout, a dialog prompts the user to continue or abort the database request. The option "Forever" has been removed. If continued, the request will be forcibly terminated once systemDBRequestTimeout is reached.

Configure both values in the Designer or customizing to control user experience during long-running queries. If no values are provided, default values are used:

  • systemDBRequestWarnTimeout: 10 seconds
  • systemDBRequestTimeout: 30 seconds

202420_Timeout Figure: Timeout settings

202420_yes_no_modal Figure: Prompt displayed after warn timeout


3. question.showDialog / closeDialog: Deprecated

What changed

The functions question.showDialog() and question.closeDialog() are deprecated and will be removed in version 2025.0.0.

Why it matters

These functions are no longer recommended and are unused in the current XRM basic project.

Replace deprecated function calls with supported alternatives before version 2025.0.0.


4. AuthenticationProvider: "scope" is now mandatory

What changed

As of version 2024.2.0, the scope field must be explicitly set in AuthenticationProvider aliases.

Why it matters

Previously, an empty scope would apply all application permissions. This is no longer supported unless only the openid permission is needed.

Set a specific scope if your API usage requires additional permissions (e.g., in getUsernameFromAccessTokenProcess for CUSTOM providers).


5. netMultipart Library: Multipart/form-data API support

What changed

The new netMultipart system library enables working with REST APIs that require multipart/form-data.

Why it matters

This library simplifies the process of sending multiple content types in a single request, especially useful for document generation services and similar integrations.

Use netMultipart to construct binary and text multipart entities. See the example below.

Example usage

import { net, auth, logging, fileIO, util, netMultipart } from "@aditosoftware/jdito-types";

// Load file content for multipart
const docBinary = fileIO.getData("c:/temp/template.docx", util.DATA_BINARY, "UTF-8");
const jsonData = fileIO.getData("c:/temp/data.json", util.DATA_TEXT, "UTF-8");

// Construct multipart parts
const partDoc = netMultipart.createBinaryMultipart("template", docBinary, "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "template.docx");
const partData = netMultipart.createTextMultipart("data", jsonData);

// Prepare REST configuration
const authConfig = auth.createConfigForNoAuth();
const restConfig = net.createConfigForRestWebserviceCall();
restConfig
.actionType(net.POST)
.url("https://doc-generator.example.com/api/v1/generate")
.dataTypeSend("multipart/form-data")
.dataTypeAccept("application/vnd.openxmlformats-officedocument.wordprocessingml.document")
.requestEntityMultipart(null, [partDoc, partData]);

// Execute request
try {
const response = net.callRestWebservice(restConfig, authConfig);
fileIO.storeData("c:/temp/generated.docx", response, util.DATA_BINARY, false);
logging.log("Document generated and saved as c:/temp/generated.docx");
} catch (e) {
logging.log("Error during document generation:");
logging.log(e);
}