createCase(className, targetContext, options)
Creates a case and loads the view into a container.
Returns
An empty Promise.
Parameters
Name | Type | Description | Required |
className | string | The name of the class that the created case should belong to. | ✅ |
targetContext | string | The context where the view must be loaded. | ❌ |
options | object | The JavaScript object containing the property that can be used to load a specific view. | ❌ |
The following table contains the properties of the options object:
Name | Type | Description | Required |
pageName | string | The name of the view that must be loaded into a container. | ❌ |
startingFields | object | The JSON object that contains the fields to be set while creating a case. | ❌ |
Usage example
In this example, the API creates a case and updates the Redux Store.
const options = {
pageName: "pyEmbedAssignment",
startingFields: {
FirstName: "Adam",
LastName: "Smith",
Vehicle: {
Make: "Honda",
Model: "Accord"
}
}
};
PCore.getMashupApi().createCase('OXJ4P4-CoWin-Work-Feedback', options);
Previous topic APIs in the MashupApi class Next topic getCurrentContextAPI(pageReference, targetContext)