[SalesForce] Error When Deploying Quick Action With Predefined Lookup Field

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?

Best Answer

Few hours of frustration but using the reference

CustomObject__c.Lookup__c

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

CustomObject__r.Lookup__c

.