Skip to content

Copied Business Object References Are Not Updated

When a business object is copied from one module and pasted into another, references within the copied object are not automatically remapped to equivalent business objects in the destination module. A reference may continue to identify a business object in the source module but appear blank or unselected in the Lowgile Studio because it cannot be resolved as a valid destination-module reference.

The following symptoms may occur:

  • A property that references another business object appears empty in the destination module.
  • A property continues to display a business object from the source module.
  • An entity relationship points to an entity in the source module.
  • A Link or Navigation Item does not open the intended screen.
  • A copied screen produces unknown-element or input-binding build errors.

Lowgile stores business-object references as module-qualified values within the object’s JSON definition. Copying and pasting an object does not automatically rewrite these nested references for the destination module.

Danger

Before importing an object definition, confirm that you are working in the intended destination module and check whether it already contains an object with the same ID. By default, the imported object retains its object ID but uses the destination module qualifier. If an object with that ID already exists in the destination module, change the imported object's ID or back up the existing object before importing. Otherwise, Lowgile overwrites the existing object and its changes may be lost.

1. Copied screen references are not updated

Section titled “1. Copied screen references are not updated”

A screen copied from Purchasing to Purchasing1 retained references to the source module MainLayout and PurchaseRequestInclude screens.

The top-level moduleId identifies the copied screen as Purchasing1.PurchaseRequestUpdateCopyTest. However, its nested screenRef entries still identify Purchasing.MainLayout and Purchasing.PurchaseRequestInclude. These retained references may appear blank in the screen components’ properties because they cannot be resolved as destination-module screens.

When Lowgile generated the copied screen, it used the retained source-module references to produce elements such as:

<Purchasing-MainLayout>
<Purchasing-PurchaseRequestInclude>
Code: Complete copied screen JSON
PurchaseRequestUpdateCopyTest.json
{
"__type": "Screen",
"boId": "PurchaseRequestUpdateCopy",
"moduleId": "Purchasing1",
"creationTimestamp": {
"#date": "2025-10-21T13:11:26.314Z"
},
"updateTimestamp": {
"#date": "2026-04-29T11:49:05.656Z"
},
"isModifiable": true,
"isDeletable": true,
"isSecret": false,
"systemVersion": "2.2.2-dev",
"blocks": [
{
"__type": "ScreenBlock",
"id": 4,
"children": [
{
"__type": "ContentAreaBlock",
"id": 1,
"children": [],
"classes": [],
"fillParent": false,
"layoutSpanCode": "1",
"layoutStartLineCode": "",
"color": "",
"appearance": "fill",
"styles": [],
"eventHandlers": [],
"name": "top-right"
},
{
"__type": "ContentAreaBlock",
"id": 3,
"children": [
{
"__type": "LayoutBlock",
"id": 10,
"children": [
{
"__type": "LayoutBlock",
"id": 6,
"children": [
{
"__type": "TextBlock",
"exampleText": "",
"id": 2,
"children": [],
"classes": [],
"flex": null,
"fillParent": false,
"layoutSpanCode": "1",
"layoutStartLineCode": "",
"color": "",
"appearance": "fill",
"styles": [],
"eventHandlers": [],
"textCode": "T:Your request has been rejected. Please update it accordingly",
"style": "span",
"htmlMode": "none"
},
{
"__type": "ScreenBlock",
"id": 5,
"children": [],
"classes": [],
"flex": null,
"fillParent": false,
"layoutSpanCode": "1",
"layoutStartLineCode": "",
"color": "",
"appearance": "fill",
"styles": [],
"eventHandlers": [],
"screenRef": {
"moduleId": "Purchasing",
"boId": "PurchaseRequestInclude",
"boType": "Screen"
},
"assignments": [
[
"request",
"screen.request"
]
]
},
{
"__type": "ButtonBlock",
"exampleText": "",
"id": 7,
"children": [],
"classes": [],
"flex": null,
"fillParent": false,
"layoutSpanCode": "1",
"layoutStartLineCode": "",
"color": "primary",
"appearance": "fill",
"styles": [],
"eventHandlers": [
{
"eventName": "click",
"type": "adhoc",
"adHocCode": "await output.submit(screen.request)",
"parameterAssignments": []
}
],
"textCode": "T:Re-submit request",
"prefixIconCode": "T:send",
"prefixIconFontSet": "material-icons",
"stepperFunction": "",
"buttonType": "mat-raised-button"
}
],
"classes": [],
"flex": null,
"fillParent": false,
"layoutSpanCode": "1",
"layoutStartLineCode": "",
"color": "",
"appearance": "fill",
"styles": [],
"eventHandlers": [],
"layoutDirection": "vertical",
"itemAlignment": "inherit",
"verticalIfScreenSmallerThan": "XSmall",
"gridColumnCountCode": "2",
"columnCountPreview": 0,
"gapCode": "T:1em",
"gridRowDefinitionCode": "",
"gridColumnDefinitionCode": ""
},
{
"__type": "LayoutBlock",
"id": 8,
"children": [
{
"__type": "ChatAuditTrailBlock",
"exampleText": "",
"id": 9,
"children": [],
"classes": [],
"flex": null,
"fillParent": false,
"layoutSpanCode": "1",
"layoutStartLineCode": "",
"color": "",
"appearance": "fill",
"styles": [],
"eventHandlers": [],
"entityInstanceExpression": "screen.request",
"messagesExpression": "",
"isAllowSending": true,
"isSendAutomatically": true
}
],
"classes": [],
"flex": null,
"fillParent": false,
"layoutSpanCode": "1",
"layoutStartLineCode": "",
"color": "",
"appearance": "fill",
"styles": [],
"eventHandlers": [],
"layoutDirection": "vertical",
"itemAlignment": "inherit",
"verticalIfScreenSmallerThan": "XSmall",
"gridColumnCountCode": "2",
"columnCountPreview": 0,
"gapCode": "T:1em",
"gridRowDefinitionCode": "",
"gridColumnDefinitionCode": ""
}
],
"classes": [],
"fillParent": false,
"layoutSpanCode": "1",
"layoutStartLineCode": "",
"color": "",
"appearance": "fill",
"styles": [],
"eventHandlers": [],
"layoutDirection": "horizontal",
"itemAlignment": "inherit",
"verticalIfScreenSmallerThan": "XSmall",
"gridColumnCountCode": "2",
"gapCode": "T:1em",
"gridRowDefinitionCode": "",
"gridColumnDefinitionCode": ""
}
],
"classes": [],
"fillParent": false,
"layoutSpanCode": "1",
"layoutStartLineCode": "",
"color": "",
"appearance": "fill",
"styles": [],
"eventHandlers": [],
"name": "content"
}
],
"classes": [],
"fillParent": false,
"layoutSpanCode": "1",
"layoutStartLineCode": "",
"color": "",
"appearance": "fill",
"styles": [],
"eventHandlers": [],
"screenRef": {
"moduleId": "Purchasing",
"boId": "MainLayout",
"boType": "Screen"
},
"assignments": [
[
"screenTitle",
""
],
[
"isForExternalUser",
""
]
]
}
],
"variableDefinitions": [
{
"name": "request",
"type": "This.PurchaseRequest",
"defaultExpression": "",
"context": "input",
"isStatic": false
}
],
"computationDefinitions": [],
"actions": [
{
"name": "onInit",
"inputs": [],
"code": ""
}
],
"outputs": [
{
"name": "submit",
"outputTsType": "This.PurchaseRequest",
"canDriveProcess": true
}
],
"renderAs": "contents",
"fillParent": false,
"staticHtmlHeaders": "",
"css": "",
"scrollPositionClasses": [],
"$level": 0
}

Because the generated screen referenced components from Purchasing, the application build reported errors such as:

NG8001: 'Purchasing-MainLayout' is not a known element
NG8001: 'Purchasing-PurchaseRequestInclude' is not a known element

The build also reported NG8002 input-binding errors because the unresolved screen components and their inputs could not be recognized.

Caution

The Angular compiler may suggest adding CUSTOM_ELEMENTS_SCHEMA or NO_ERRORS_SCHEMA. Do not modify the generated Angular configuration. Correct the unresolved business-object references in Lowgile Studio.

The relevant fields in the copied Offer entity’s JSON definition show that its items relationship still points to the source module:

{
"boId": "Offer",
"moduleId": "Purchasing1",
"relations": [
{
"name": "items",
"targetEntityRef": {
"moduleId": "Purchasing",
"boId": "OfferItem",
"boType": "Entity"
}
}
]
}

The top-level moduleId identifies the copied entity as Purchasing1.Offer, while the nested targetEntityRef still identifies Purchasing.OfferItem. This confirms that the entity was copied into the destination module but its relationship reference was not remapped.

Code: Complete copied Offer entity JSON
Offer.json
{
"__type": "Entity",
"boId": "Offer",
"moduleId": "Purchasing1",
"creationTimestamp": {
"#date": "2025-11-19T09:54:35.128Z"
},
"updateTimestamp": {
"#date": "2025-11-19T09:55:28.864Z"
},
"isModifiable": true,
"isDeletable": true,
"isSecret": false,
"systemVersion": "2.4.1",
"idType": "none",
"properties": [
{
"uuid": "f0a191cb-5c5d-4f0d-b80b-a4379b1a0b5e",
"name": "currency",
"type": "string",
"validationRules": [],
"mandatoryLevel": 0,
"isStatic": false,
"isOfInterest": true,
"defaultExpression": "",
"maxLen": 0,
"isSearchableByDefault": false
}
],
"relations": [
{
"uuid": "bb1cd994-1989-4da6-92fe-cdcacf9c316b",
"name": "items",
"idProperty": "",
"type": "one-to-many",
"targetEntityRef": {
"moduleId": "Purchasing",
"boId": "OfferItem",
"boType": "Entity"
},
"inverseRelation": "",
"enforceConstraint": true
}
],
"methods": [],
"subsets": [],
"$level": 0
}

Review each copied business object and update its dependencies in the destination module:

For example, because Purchasing1.OfferItem does not yet exist, create or copy the missing entity first. Then update the items relationship to reference Purchasing1.OfferItem.

  1. Open the copied business object in the destination module.
  2. Identify properties, relationships, components, bindings, or actions that still reference the source module.
  3. Confirm whether each corresponding business object exists in the destination module.
  4. If a required object does not exist, create it or copy it into the destination module.
  5. Review the newly created or copied object for any references that still point to the source module.
  6. Return to the original copied object and replace each source-module reference with the corresponding destination-module object.
  7. Repeat these steps until no unintended source-module references remain.
  8. Save your changes before continuing.

  9. Wait for the application to complete a successful build.
  10. Run the application and confirm that the copied objects work as intended.

Attention

Copying a missing dependent business object does not automatically repair an existing reference. After the dependent object exists in the destination module, return to the copied object and update the reference explicitly.

Depending on the copied business-object type, review:

  • Layout and included screen references,
  • Link and Navigation Item destinations,
  • Entity relationships,
  • Variables and bindings,
  • Actions and methods, and
  • Any other property containing a module-qualified business-object reference.