Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..

cancel
Showing results for 
Search instead for 
Did you mean: 
100% helpful (2/2)
Kb-Sync
Collaborator III

Applies To


Product(s): Archer
Version(s): All Versions
Primary Deployment: On Premises/AWS Hosted/AWS SaaS

Description


When attempting to save records in an application, the below error is thrown:
An unexpected error occurred while calculating field values for this record. Your previously stored field values, if any, have been retained for this record. Please contact your Archer administrator for assistance.
0EMVM000003VI5O.png0EMVM000003VI5O.png
The below errors are found in the w3wp logs (for versions prior to 6.13 P2):
<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
    <System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
        <EventID>7</EventID>
        <Type>3</Type>
        <SubType Name="Error">0</SubType>
        <Level>2</Level>
        <TimeCreated SystemTime="2024-03-20T11:00:47.2929012Z" />
        <Source Name="Archer.Engine" />
        <Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" />
        <Execution ProcessName="w3wp" ProcessID="8696" ThreadID="14" />
        <AssemblyVersion>6.13.0.10202</AssemblyVersion>
        <Channel />
        <Computer>ALL</Computer>
    </System>
    <ApplicationData>
        <TraceData>
            <DataItem>
                <TraceRecord Severity="Error" xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord">
                    <TraceIdentifier>Archer.Engine</TraceIdentifier>
                    <Description>Nullable object must have a value.</Description>
                    <AppDomain>/LM/W3SVC/1/ROOT/RSAarcher-1-133554060260420479</AppDomain>
                    <Exception>
                        <ExceptionType>System.InvalidOperationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
                        <Message>Nullable object must have a value.</Message>
                        <Source>mscorlib</Source>
                        <StackTrace>   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at ArcherTech.Services.Providers.DataProviders.ArcherCommonDataProvider.ReadFieldsById(String instanceName, List`1 fieldIds, Boolean errorIfNotAllFieldsFound, SessionContext sessionContext)
   at ArcherTech.Services.Providers.DataProviders.ArcherCommonDataProvider.ReadFields(String instanceName, List`1 fieldIds)
   at ArcherTech.Services.CalculationService.RecalculateContent.GetFieldsNeededForRecalc(DataProviderBase dataProvider)
   at ArcherTech.Services.CalculationService.RecalculateContent.Initialize(DataProviderBase dataProvider)
   at ArcherTech.Services.CalculationService.CalculationService.GetRecalculateContent(RecalculateContentInitializationParameters initializationParams)
   at ArcherTech.Services.CalculationService.CalculationService.RecalculateContentInternal(CalculationContent content, ICollection`1 changedFields, Boolean isNewContent, Boolean getWholeGraph)
   at ArcherTech.Services.CalculationService.CalculationService.ContentAdded(CalculationContent contentBeingAdded, ICollection`1 changedFields)</StackTrace>
                    </Exception>
                </TraceRecord>
            </DataItem>
        </TraceData>
    </ApplicationData>
</E2ETraceEvent>

<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
    <System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
        <EventID>4</EventID>
        <Type>3</Type>
        <SubType Name="Error">0</SubType>
        <Level>2</Level>
        <TimeCreated SystemTime="2024-03-20T11:00:47.2929012Z" />
        <Source Name="Archer.Kernel.ContentSave" />
        <Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" />
        <Execution ProcessName="w3wp" ProcessID="8696" ThreadID="14" />
        <AssemblyVersion>6.13.0.10202</AssemblyVersion>
        <Channel />
        <Computer>ALL</Computer>
    </System>
    <ApplicationData>
        <TraceData>
            <DataItem>
                <TraceRecord Severity="Error" xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord">
                    <TraceIdentifier>Archer.Kernel.ContentSave</TraceIdentifier>
                    <UserId>2</UserId>
                    <Description>Nullable object must have a value.</Description>
                    <AppDomain>/LM/W3SVC/1/ROOT/RSAarcher-1-133554060260420479</AppDomain>
                    <Exception>
                        <ExceptionType>System.InvalidOperationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
                        <Message>Nullable object must have a value.</Message>
                        <Source>mscorlib</Source>
                        <StackTrace>   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at ArcherTech.Services.Providers.DataProviders.ArcherCommonDataProvider.ReadFieldsById(String instanceName, List`1 fieldIds, Boolean errorIfNotAllFieldsFound, SessionContext sessionContext)
   at ArcherTech.Services.Providers.DataProviders.ArcherCommonDataProvider.ReadFields(String instanceName, List`1 fieldIds)
   at ArcherTech.Services.CalculationService.RecalculateContent.GetFieldsNeededForRecalc(DataProviderBase dataProvider)
   at ArcherTech.Services.CalculationService.RecalculateContent.Initialize(DataProviderBase dataProvider)
   at ArcherTech.Services.CalculationService.CalculationService.GetRecalculateContent(RecalculateContentInitializationParameters initializationParams)
   at ArcherTech.Services.CalculationService.CalculationService.RecalculateContentInternal(CalculationContent content, ICollection`1 changedFields, Boolean isNewContent, Boolean getWholeGraph)
   at ArcherTech.Services.CalculationService.CalculationService.ContentAdded(CalculationContent contentBeingAdded, ICollection`1 changedFields)
   at ArcherTech.Kernel.Brokers.RecalculateContentForInsertTask.ExecuteCalculationService(ContentContext contentContext)
   at ArcherTech.Kernel.Brokers.RecalculateContentTaskBase.Execute(ContentContext contentContext)</StackTrace>
                    </Exception>
                </TraceRecord>
            </DataItem>
        </TraceData>
    </ApplicationData>
</E2ETraceEvent>
The below errors are found in the w3wp logs (for version 6.13 P2 and later):
<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
    <System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
        <EventID>2</EventID>
        <Type>3</Type>
        <SubType Name="Error">0</SubType>
        <Level>2</Level>
        <TimeCreated SystemTime="2024-03-20T11:43:35.5545182Z" />
        <Source Name="Archer.Engine" />
        <Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" />
        <Execution ProcessName="w3wp" ProcessID="8256" ThreadID="17" />
        <AssemblyVersion>6.14.200.10528</AssemblyVersion>
        <Channel />
        <Computer>ALL</Computer>
    </System>
    <ApplicationData>
        <TraceData>
            <DataItem>
                <TraceRecord Severity="Error" xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord">
                    <TraceIdentifier>Archer.Engine</TraceIdentifier>
                    <Description>Misconfigured Calculation on FieldID: 2479, Field Name: Devices, IsCalculated: True, Field XReferece ID: 2478, Field XReferece Name: Applications, Error Message: Nullable object must have a value., Call Stack:    at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at ArcherTech.Services.Providers.DataProviders.ArcherCommonDataProvider.ReadFieldsById(String instanceName, List`1 fieldIds, Boolean errorIfNotAllFieldsFound, SessionContext sessionContext)</Description>
                    <AppDomain>/LM/W3SVC/1/ROOT/Archer-2-133554085895455776</AppDomain>
                </TraceRecord>
            </DataItem>
        </TraceData>
    </ApplicationData>
</E2ETraceEvent>
Starting version 6.13 P2, logging for this issue was enhanced where it identifies the fields causing it (as shown above).

Cause


There are one or more Cross-Reference fields that are NOT calculated; and their corresponding Related Records fields are set as calculated and vice versa.
Note: This issue could be observed when saving records in both applications:
  • Application that includes the Related Records field.
  • Application that includes the Cross-Reference field.

Resolution


Execute the below script against the Instance Database to retrieve all fields (Cross-Reference and Related Records) that have mismatching configurations:
SELECT fdcr.field_id xref_field_id, fr.related_field_id rr_field_id 
, fdcr.calculated xref_calculated, fdrr.calculated rr_calculated
FROM dbo.tblIVFieldDefCrossRef fdcr
LEFT JOIN dbo.tblIVFieldRelationship fr ON fr.reference_field_id = fdcr.field_id
LEFT JOIN dbo.tblIVFieldDefRelatedRecord fdrr ON fdrr.field_id = fr.related_field_id
WHERE (fdcr.calculated = 1 AND ISNULL(fdrr.calculated, 0) = 0)
OR (fdcr.calculated = 0 AND ISNULL(fdrr.calculated, 0) = 1)
Following this, fix each pair of fields by following the steps below:
1. Open the application which has the Cross-Reference field.
2. Go to the Cross-Reference field and open its Properties.
3. If the field is not calculated, set it to calculated by enabling the Make this a calculated field checkbox.
4. Then click on Save Properties.
5. Click on Not Now in the prompt window that appears asking to recalculate now.
0EMVM000003SWZW.png0EMVM000003SWZW.png
6. Then uncheck the Make this a calculated field option and then Save Properties. This will re-sync the Cross-Reference and its Related Records field calculation configurations.
7. Following this, you should be able to save the record.
8. If the Cross-Reference and Related Records fields should be calculated, enable the Make this a calculated field option in the Cross-Reference field and set the Calculation Properties accordingly, then Save Properties.

Note: Alternatively, if the Cross-Reference field is calculated and the Related Records field is not calculated, then just disable the Cross-Reference field's calculation by unchecking the Make this a calculated field checkbox and then click on Save Properties. Following this, both fields will have matching calculation configurations and the record should be saved successfully.

Version history
Last update:
‎2024-09-26 08:25 AM
Updated by: