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

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"
i am new in this plse help..ASAP
Get_ProductPrice_On_Sq_lines: execution of AfterUpdate caused by: System.StringException: Invalid id: Trigger.Get_ProductPrice_On_Sq_lines: line 65, column 1"
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 - https://www.srinivas4sfdc.com/2016/07/systemstringexception-invalid-id-error.html
Let me know if this helps!
https://developer.salesforce.com/forums/ForumsMain?id=9062I000000R0U7QAK