internal override void updateReferencesAfterDeserialize(SFRefereceResolver i_ReferenceResolver, bool i_ShouldAddToRelatedLists = true) { JToken objectJson = removeObjectJTokenFromAdditionalDictionary("ServiceTerritory"); ServiceTerritory = DeserializationUtils.GetSingleObjectReference <ServiceTerritory>(ServiceTerritoryId, objectJson, i_ReferenceResolver); objectJson = removeObjectJTokenFromAdditionalDictionary("ParentWorkOrderLineItem"); ParentWorkOrderLineItem = DeserializationUtils.GetSingleObjectReference <WorkOrderLineItem>(ParentWorkOrderLineItemId, objectJson, i_ReferenceResolver); objectJson = removeObjectJTokenFromAdditionalDictionary("RootWorkOrderLineItem"); RootWorkOrderLineItem = DeserializationUtils.GetSingleObjectReference <WorkOrderLineItem>(RootWorkOrderLineItemId, objectJson, i_ReferenceResolver); objectJson = removeObjectJTokenFromAdditionalDictionary("WorkOrder"); WorkOrder = DeserializationUtils.GetSingleObjectReference <WorkOrder>(WorkOrderId, objectJson, i_ReferenceResolver); objectJson = removeObjectJTokenFromAdditionalDictionary("WorkType"); WorkType = DeserializationUtils.GetSingleObjectReference <WorkType>(WorkTypeId, objectJson, i_ReferenceResolver); VisitingHours__r = DeserializationUtils.GetSingleObjectReference <OperatingHours>(VisitingHours__c, i_ReferenceResolver); VisitingHours__r = DeserializationUtils.CreateEmptyReferenceFromId(VisitingHours__c, VisitingHours__r, i_ReferenceResolver); DeserializationUtils.ProcessRelatedObjectsCollection(skillRequirementsCollection, i_ReferenceResolver); skillRequirementsCollection = null; base.updateReferencesAfterDeserialize(i_ReferenceResolver); }
internal override void updateReferencesAfterDeserialize(SFRefereceResolver i_ReferenceResolver, bool i_ShouldAddToRelatedLists = true) { DeserializationUtils.ProcessRelatedObjectsCollection(scheduling_Policy_GoalsCollection, i_ReferenceResolver); scheduling_Policy_GoalsCollection = null; DeserializationUtils.ProcessRelatedObjectsCollection(scheduling_Policy_Work_RuleCollection, i_ReferenceResolver); scheduling_Policy_Work_RuleCollection = null; base.updateReferencesAfterDeserialize(i_ReferenceResolver); }
internal static void ProcessRelatedObjectsCollection <T>(RelatedObjectCollection <T> i_ObjectCollection, SFRefereceResolver i_ReferenceResolver) where T : sObject { if (i_ObjectCollection != null) { foreach (T innerRecord in i_ObjectCollection.records) { i_ReferenceResolver.AddReference(innerRecord); innerRecord.updateReferencesAfterDeserialize(i_ReferenceResolver); } } }