I have a Quick Action which works fine and has predefined field to a lookup record, AddressType, though it happens in all cases. When deploying to scratch org I get error

Formula result is data type (Text), incompatible with expected data type (Lookup(Address Type)).

Formula return now is MasterObject.AddressType__c. I also tried MasterObject.AddressType__r.Id. Neither works same error in both (second one makes sense though). How do we reference these so they can be deployed to scratch orgs?

1 Answer 1


Few hours of frustration but using the reference


works in the Quick Action but not in the deploy. Have to use



  • Just out of curiosity, what does sfdx pull/metadata api retrieve return? Is that CustomObject__r or CustomObject__c ?
    – kurunve
    May 21, 2019 at 5:24
  • 1
    CustomObject__c. That was a large part of the issue since they are inconsistent in how they treat this.
    – ddeve
    May 21, 2019 at 11:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.