You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, fflib_IDGenerator.generate(ContactHistory.SObjectType) returns null000000000000 for any xxxHistory object because getDescribe().getKeyPrefix() returns null for these SObjects
Extend the class's generate method to look like this:
While mocking xxxHistory records is problematic as you can't mock OldValue or NewValue fields including via Json.deserialize, you can mock the other fields (Id, ParentId, Field) via Json.deserialize and hence can produce selector mocks for use cases such as testing Field History deletion (introduced in V42)
The text was updated successfully, but these errors were encountered:
Currently,
fflib_IDGenerator.generate(ContactHistory.SObjectType)
returnsnull000000000000
for any xxxHistory object because getDescribe().getKeyPrefix() returns null for these SObjectsExtend the class's
generate
method to look like this:While mocking
xxxHistory
records is problematic as you can't mockOldValue
orNewValue
fields including viaJson.deserialize
, you can mock the other fields (Id
,ParentId
,Field
) viaJson.deserialize
and hence can produce selector mocks for use cases such as testing Field History deletion (introduced in V42)The text was updated successfully, but these errors were encountered: