You need to sign in to do that
Don't have an account?

Advanced Admin: Explore Custom Transaction Security Policies - Issue with first test class
Hi All,
In attempting to compile the first test class provided in the 'Explore Custom Transaction Security Policies' module, I receive 2 compile errors.
The first was around line 29, where the semi colon beside eventData needs to be moved outside of the right parenthesis.
However after trying to compile after that change there is another error complaining that the platform field of the LoginHistory object (declared as loginHistoryObj for our instance) is not writeable. Below are the lines of importance...
/* Create a history object that has Platform = Android 4. */
LoginHistory loginHistoryObj = new LoginHistory();
loginHistoryObj.Platform = 'Android 4'; <---- this is where the compile is complaining (Error: Compile Error: Field is not writeable: LoginHistory.Platform at line 7 column 5)
I checked the LoginHistory Object documentation, and it looks like it should be writeable to me.
Does anyone have any suggestions? or is this a bug of some sort?
Check this unit again as I think some of the requirements may have changed with yesterday's Trailhead update.
Jeff Douglas
Trailhead Developer Advocate
Hi Jeff,
Thanks for the response, I tried to complie again and I am still reciving the same issues.
Semi colon in wrong place and LoginHistory.Platform is not writable.
Cheers,
Jason
https://twitter.com/trailhead/status/777953336003735552