• HectorBayona
  • NEWBIE
  • 0 Points
  • Member since 2015
  • Salesforce Developer
  • Cable & Wireless Communications


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hello

I have this snipet it works well in Work Bench Apex Execute but this same snipet if I put in a class I'm getting an error because don't identify the field ParentId No such column 'ParentId' on entity 'Asset'. If you are attempting to use a custom field, be sure to append the '__c'​ the same thing happend with product
list<Asset> phm =new List<Asset>([SELECT SerialNumber,Id,Name FROM Asset Where ParentId IN ('02i2200000054lOAAQ')]);
The field is createable: true and Set Field-Level Security all user are visible.
 
Hello

I have this snipet it works well in Work Bench Apex Execute but this same snipet if I put in a class I'm getting an error because don't identify the field ParentId No such column 'ParentId' on entity 'Asset'. If you are attempting to use a custom field, be sure to append the '__c'​ the same thing happend with product
list<Asset> phm =new List<Asset>([SELECT SerialNumber,Id,Name FROM Asset Where ParentId IN ('02i2200000054lOAAQ')]);
The field is createable: true and Set Field-Level Security all user are visible.