No ratings

Drawloop - Error when using Standard Activity History Relationship

Issue

When using a Standard Activity History Relationship, the DocGen Run errors. This is due to the Activity History object not being directly queriable. 

 

Additional information

There are two options to obtain Activity History Data:

 

Option 1:

  • Create two separate standard relationships to the "Event" and "Task"  Objects. Depending on the location of the Event and Task Parent object, you may also use a Stand Alone / Unrelated Data relationship and filter it using a Field Tag.  
  • Then you will be able to replicate each relationship as desired. 

 

Option 2:

  • Query for Activity History in a SOQL. Salesforce does not allow the Activity History to be queried directly, it must be ActvitiyHistories in a subquery.
     
    For example, if the starting object is Contact:
     
    SELECT id, (SELECT Id, Subject, Status, Description, ActivityDate FROM ActivityHistories ORDER BY ActivityDate DESC, LastModifiedDate DESC) FROM Contact WHERE Id = '<<Contact_Id>>'
     
    This would provide you with a Table and Row start tag which will be able to row replicate all the data into a specific table without splitting them up as above in Option 1.

 

Related Links

Salesforce ActivityHistory: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_...

 

SOQL: https://help.nintex.com/en-US/docgensf/DeliveryStorage/SOQLQueryRelationships.htm

 

 

Labels: (1)
Version history
Last update:
‎03-26-2021 01:43 PM
Updated by:
Contributors