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
chandra prakash 58chandra prakash 58 

getting update Trigger Error

I am writing a trigger to update two currency field as null when a lookup field is Null but I getting the error when try to update record"
Get_ProductPrice_On_Sq_lines: execution of AfterUpdate caused by: System.StringException: Invalid id: Trigger.Get_ProductPrice_On_Sq_lines: line 65, column 1"User-added imagei am new in this plse help..ASAP

Footprints on the MoonFootprints on the Moon
Hi Chandra,
The reason behind the error is, you are comparing a lookup field with string ('') on line 65.
Keep the condition with null comparison only, and remove second condition where you are comparing with empty string, it should solve the issue.

For more info, refer -

Let me know if this helps!
chandra prakash 58chandra prakash 58
Shreyas thank you for your response I applied your solution but not work. kindly please help in the problem of bellow provided URL.