Order Object highlights Name field as error: 'Cannot resolve symbol'

Issue #2614 resolved
Tony White created an issue

When populating the Order object in Apex, the Name field shows as an error, even though its part of the object metadata:

https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_order.htm

        Order updateOrder = new Order(
            Id = orderId,
            Description = detail,
            Name = detail.left(80)
        );

ā€Œ

Comments (4)

  1. Scott Wells repo owner
    • changed status to open

    Tony, I'm not seeing that issue locally:

    Issue2614.png

    Can you confirm whether or not this same issue reproduces in an otherwise empty project? If it doesn't, can you see whether there's another type called Order that IC2 might be resolving incorrectly? You could also change the type of updateOrder to Schema.Order to force it to resolve to the SObject type.

  2. Scott Wells repo owner

    Ah, okay. Iā€™m a little surprised that would happen with Name, but at least it makes sense. Thanks for circling back to let me know.

  3. Log in to comment