Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Surfleetssh committed Apr 23, 2021
1 parent 83ac48b commit d67e961
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,7 @@ public virtual class fflib_SObjectUnitOfWork
{
for (Schema.SObjectType sObjectType : m_sObjectTypes)
{
m_relationships.get(sObjectType.getDescribe().getName()).resolve();
m_dml.dmlUpdate(m_dirtyMapByType.get(sObjectType.getDescribe().getName()).values());
}
}
Expand Down Expand Up @@ -875,7 +876,10 @@ public virtual class fflib_SObjectUnitOfWork

public void resolve()
{
this.Record.put( this.RelatedToField, this.RelatedTo.Id);
//check relationship Id due to update use.
if (this.Record.get(this.RelatedToField) == null){
this.Record.put( this.RelatedToField, this.RelatedTo.Id);
}
}
}

Expand Down

0 comments on commit d67e961

Please sign in to comment.