Skip to main content
Nintex Community Menu Bar

Drawloop - Error when using Standard Activity History Relationship


Brent_Doc
Nintex Employee
Forum|alt.badge.img+12

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_objects_activityhistory.htm

 

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

 

 

Translate
Did this topic help you find an answer to your question?

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings