copy information from field in one app to two fields in different app

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • In Progress
Currently, our company has two seperate apps we use in Quickbase, one is for sales and the other is for everything past the sales process once a sale has been made.



Right now, the admin has to manually type the information from a field in the sales app to two seperate fields in the corporate app. I'm trying to make is so that admin can press a button from the original sales app with personal info and generate a new customer and project in the corporate app with the available information. Or if its easier, once the lead in the sales CRM is marked as sold, it automatically generates a new customer and project.

Photo of Evan Leith

Evan Leith

  • 170 Points 100 badge 2x thumb

Posted 2 years ago

  • 0
  • 1
There are a few ways to do this ranging from fairly basic to more complex. 

The most complex way to do it would provide the best result, one button click, and a customer and project are created in the new app with the project being related to the customer in the end and perhaps the user is taken to the new project record. This can be done but with some required code that would do all the heavy lifting (if you want to go this way, contact me via the info in my profile).

The only way I can think of to provide an answer that you can handle yourself without too much code would be the following:

1. You would need a relationship between your two apps, from the leads table to the customers table, where one lead could have many customers. (obviously 1 to 1, but all relationships are one to many) 

2. From there, you could create a button that automatically creates the customer record in the project app. That button would have some code that would look like this:

URLRoot() & "db/" & "dbid of your customers table" & "?a=API_addrecord&_fid_XX=" & URLEncode ([Record ID#])
& "&_fid_7=" & URLEncode ([Lead Company Name])& "&_fid_52=" & URLEncode ([Phone])
& "&_fid_42=" & URLEncode ([Website])
& "&_fid_33=" & URLEncode ([Address: Street 1])
& "&_fid_34=" & URLEncode ([Address: Street 2])
& "&_fid_35=" & URLEncode ([Address: City])
& "&_fid_36=" & URLEncode ([Address: State/Region])
& "&_fid_37=" & URLEncode ([Address: Postal Code])
& "&_fid_38=" & URLEncode ([Address: Country])
&"&apptoken= YourAppTokenForTheProjectsApp"

(Note: XX would equal the field id of your related lead field in your relationship between leads and customers. this also assumes that record id# is the key field of your leads table.)

(Also Note: the field numbers are the field id's on the customer table in the projects app, the [bracket field names] are the fields in the lead table in the sales app.)

3. You would need a summary field in this relationship to summarize the minimum value of the record id from the customers table up to the lead table. This will allow your project button to link the project data to the correct customer in the projects app.

4. Create a button that automatically creates a project on the project table, and links to the previously created customer. That button would have some code that would look like this:

URLRoot() & "db/" & "dbid of your projects table" & "?a=API_addrecord&_fid_XX=" & URLEncode ([Minimum Customer Record ID#])
& "&_fid_6=" & URLEncode ([Project Name])& "&_fid_7=" & URLEncode ([Project Start Date])
& "&_fid_8=" & URLEncode ([Project Description])
& "&_fid_9=" & URLEncode ([Project Type])
&"&apptoken= YourAppTokenForTheProjectsApp"

(Note: XX would equal the field id of your summary field created in step 3 in your relationship between leads and customers.)

(Also Note: the field numbers are the field id's on the projects table in the projects app, the [bracket field names] are the fields in the lead table in the sales app that have project data.)

So, this solution results in 2 buttons. The user would click the first one to create the customer and then the second one to create the project.

I hope this helps. If it is a bit too complicated, enter a support case with quickbase or contact me using the information in my profile. I am happy to help.

Good Luck!
(Edited)