How to set a lookup field by name
Hi, I am using PHP SDK in CRM, and I created a custom lookup field referring to the Accounts. The only way to search that field value is by (unique) name, and it should return an account.
I tried something like
- $record1->addKeyValue('my_new_account_lookup_field', 'My Account Name to Search')
But the error I get is
- 400 error INVALID_DATA my_new_account_lookup_field
Probably because I set a string, instead of the account resource? But how do I search the account record(s) by Name?
Additionally, is there a way to set additional parameter during search, like Account Type, and not just the Account Name?