Forum Discussion

DavyOu1's avatar
DavyOu1
Qrew Trainee
4 years ago

Combine URL buttons' api cals

Hi community,

I am building an ERP system and I need some help about combining api calls in one URL button.

As shown in the below screenshot, there are status notes and documents tabs in an opportunity record.

Also, at the bottom you can see a button of Convert to Sales Order, which can take a bunch of information from an opportunity to a sales order. But it cannot take related status notes and documents to the other table.


I would love to have, when I click on the Convert to Sales Order button, the related status notes and documents from the opportunity record will also be brought over to the new sales order record. 


Please be mindful that, opportunities, sales orders, status notes and documents are four different tables.

The relationship:
one opportunity to many sales orders;
one opportunity record to many status notes;
one opportunity record to many documents;
one sales order record to many status notes;
one sales order record to many documents.

URL for the Convert to Sales Order button:
URLRoot() & "db/" & [_DBID_SALES] & "?a=API_GenAddRecordForm&_fid_22=" & URLEncode ([Record ID#])&
"&_fid_20=" & URLEncode ([Related Customer])&
"&_fid_24=" & URLEncode ([Sales Representative])

URL to add document in the Opportunities table:
URLRoot() & "db/" & [_DBID_DOCUMENTS] & "?a=API_GenAddRecordForm&_fid_13=" & URLEncode ([Record ID#])&
"&z=" & Rurl()

URL to add document in the Sales Orders table:
URLRoot() & "db/" & [_DBID_DOCUMENTS] & "?a=API_GenAddRecordForm&_fid_11=" & URLEncode ([Record ID#])&
"&_fid_12=" & URLEncode ([Related Customer])&
"&z=" & Rurl()



------------------------------
Thank you for your help!

Davy Ou, Quantitative Financial analyst
Certified QuickBase Developer, Lifetime learner
https://www.linkedin.com/in/davyou/
------------------------------
No RepliesBe the first to reply