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
yaminiyamini 

owner id is not working

Hi, 

 

I have sand box account of client. In that account i have the custom object as testing. Now i wrote the trigger for the testing object. Want to collect the owner id of object in to set. When i add the owner id in to set it gives the error as 

 

No such column 'ownerid' on entity 'testing__c'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name.

 

and i queried from system log (system.debug([select ownerid from application__C]);)also it give the same error. This object contain master detail look up with opportunity. 

 

In the same account the owner id working for the custom object which is not having the look up with any object. How to solve this error and how to collect the owner id of custom object.

bob_buzzardbob_buzzard

The owner information isn't available in a detail record - it is automatically set to the owner of the master record.  Thus you'll need to execute a SOQL query to extract the owner of the master record.