API_GenAddRecordForm not setting lookup field

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

I have a feeling I'm overlooking something simple.  I'm trying to use API_GenAddRecordForm and it is working, except it isn't assigning the [Company Name] field.  This field is a lookup field (in the Companies table).

I'm using this formula.  I've double checked the field ID's.  Field 14 is set correctly, but my company name field is not.  Is there something special needed for these types of fields?  Am I overlooking something simple?

URLRoot() & "db/" & [_DBID_OPPORTUNITIES] & "?a=API_GenAddRecordForm&_fid_33=" & URLEncode ([Company Name])& "&_fid_14=" & URLEncode ("O1 - New")

Thanks in advance,
Dave

Photo of David

David

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Yes, you are overlooking something simple :)

The field that you need to populate is the field [Related Company], not Company Name (which you said is a lookup field). Once you populate [Related Company], then all the lookup fields, be they just 1 lookup field or or 100 lookup fields, will all come down automatically.
Photo of David

David

  • 0 Points
Thanks, Mark!