Skip to main content
Solved

How to Associate Inbound Emails with Opportunities

  • July 15, 2024
  • 2 replies
  • 94 views

Forum|alt.badge.img+1

If ACU processes an inbound email it can associate it with a contact. However, the activity is not visible in the opportunity activity for that contact. From the opportunity you can see the Lead’s activities, but not the contacts.

How would you associate inbound emails with an opportunity?

Or how would you include/merge the primary contacts activities in the opportunity’s activity list?

Best answer by Leif

This worked for me. It just merges in the activities for the current contact.

 

    public class OpportunityMaint_ActivityDetailsGPExt : PXGraphExtension<OpportunityMaint_ActivityDetailsExt, OpportunityMaint>
{
[PXOverride]
public Type GetLinkConditionClause()
{
//var op = this.Base.Opportunity.Current;
//var c = this.Base.Contacts.Current;


return typeof(Where<BqlChainableConditionBase<TypeArrayOf<IBqlBinary>.
FilledWith<
And<Compare<CRPMTimeActivity.refNoteID, In<P.AsGuid>>>>
>.Or<
Brackets<
BqlChainableConditionBase<TypeArrayOf<IBqlBinary>.
FilledWith<And<Compare<Current<CROpportunityClass.showContactActivities>, Equal<True>>>>
>.
And<BqlOperand<CRPMTimeActivity.refNoteID, IBqlGuid>.IsEqual<BqlField<CROpportunity.leadID, IBqlGuid>.FromCurrent>>>
>.
Or<BqlOperand<CRPMTimeActivity.refNoteID, IBqlGuid>.IsEqual<BqlField<Contact.noteID, IBqlGuid>.FromCurrent>>
>);
}
}

 

 

2 replies

Forum|alt.badge.img+1
  • Author
  • Varsity I
  • Answer
  • July 15, 2024

This worked for me. It just merges in the activities for the current contact.

 

    public class OpportunityMaint_ActivityDetailsGPExt : PXGraphExtension<OpportunityMaint_ActivityDetailsExt, OpportunityMaint>
{
[PXOverride]
public Type GetLinkConditionClause()
{
//var op = this.Base.Opportunity.Current;
//var c = this.Base.Contacts.Current;


return typeof(Where<BqlChainableConditionBase<TypeArrayOf<IBqlBinary>.
FilledWith<
And<Compare<CRPMTimeActivity.refNoteID, In<P.AsGuid>>>>
>.Or<
Brackets<
BqlChainableConditionBase<TypeArrayOf<IBqlBinary>.
FilledWith<And<Compare<Current<CROpportunityClass.showContactActivities>, Equal<True>>>>
>.
And<BqlOperand<CRPMTimeActivity.refNoteID, IBqlGuid>.IsEqual<BqlField<CROpportunity.leadID, IBqlGuid>.FromCurrent>>>
>.
Or<BqlOperand<CRPMTimeActivity.refNoteID, IBqlGuid>.IsEqual<BqlField<Contact.noteID, IBqlGuid>.FromCurrent>>
>);
}
}

 

 


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • July 15, 2024

Thank you for sharing your solution with the community @Leif!