internal override void updateReferencesAfterDeserialize(SFRefereceResolver i_ReferenceResolver, bool i_ShouldAddToRelatedLists = true)
        {
            JToken objectJson = removeObjectJTokenFromAdditionalDictionary("ServiceAppointment");

            ServiceAppointment = DeserializationUtils.GetSingleObjectReference <ServiceAppointment>(ServiceAppointmentId, objectJson, i_ReferenceResolver);
            if (ServiceAppointment != null && i_ShouldAddToRelatedLists)
            {
                ServiceAppointment.ServiceResources.Add(this);
            }

            objectJson  = removeObjectJTokenFromAdditionalDictionary("ServiceCrew");
            ServiceCrew = DeserializationUtils.GetSingleObjectReference <ServiceCrew>(ServiceCrewId, objectJson, i_ReferenceResolver);

            objectJson      = removeObjectJTokenFromAdditionalDictionary("ServiceResource");
            ServiceResource = DeserializationUtils.GetSingleObjectReference <ServiceResource>(ServiceResourceId, objectJson, i_ReferenceResolver);

            base.updateReferencesAfterDeserialize(i_ReferenceResolver);
        }
Beispiel #2
0
        internal override void updateReferencesAfterDeserialize(SFRefereceResolver i_ReferenceResolver, bool i_ShouldAddToRelatedLists = true)
        {
            JToken  objectJson = removeObjectJTokenFromAdditionalDictionary("RelatedRecord");
            sObject resourcePreferenceParent = DeserializationUtils.GetSingleObjectReference <sObject>(RelatedRecordId, objectJson, i_ReferenceResolver);

            switch (resourcePreferenceParent.attributes.type)
            {
            case "WorkOrder":
                RelatedRecord = (WorkOrder)resourcePreferenceParent;
                break;
            }
            if (RelatedRecord != null)
            {
                RelatedRecord.ResourcePreferences.Add(this);
            }

            objectJson      = removeObjectJTokenFromAdditionalDictionary("ServiceResource");
            ServiceResource = DeserializationUtils.GetSingleObjectReference <ServiceResource>(ServiceResourceId, objectJson, i_ReferenceResolver);

            base.updateReferencesAfterDeserialize(i_ReferenceResolver);
        }
 public ResourceAbsence(string i_ObjectId) : base(i_ObjectId)
 {
     m_Resource = null;
 }
 public ResourceAbsence() :
     this(null)
 {
     m_Resource = null;
 }