function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
asims2006asims2006 

Receiving Compile Error: Expression cannot be assigned at line -1 column -1 Please Help

I am trying to update a field on the Account object and keep receiving Compile Error: Expression cannot be assigned at line -1 column -1.


trigger UpdatePriceLevel on Account (before insert, before update, after insert, after update)
{
for(Account a : trigger.new)

{Account.Price_Level_Location__c = Ticket__c.Price_Level_Location__c ;}
}
GunnarGunnar
Copy the contents. Delete the trigger. Create a new trigger. (Maybe even rename the trigger) Paste. Recompile.
asims2006asims2006
Thank you!  That worked.  is there a reason why this happens?
GunnarGunnar
The key is the (-1) column and (-1) line.
No such thing.
Some kind of corruption.
When a corruption occurs, getting your code out and into a new class module or trigger is the solution.
Doesn't happen a lot but when it does, that is the only way to resolve.