Whats the best method of gathering data from SQL

What I mean is that from the REST api the POST command needs to create a new opportunity in the target table, but we have an Index that doesnt auto-increment. Instead we pull a value from a centralised table and increment that as a main pointer based on the table name.

Would the Server Side scripting be best for getting this value and then incrementing? Usually we call a stored procedure that get the @value back and does the increment for us.

Thank you!


I just sent you an email from my DF address. Stored procedures are just over the horizon… stay tuned!


  • Mark

You could do this with a server-side script as well, which is supported now. As mark said, stored procedures are another option in the next release.

I’ve been looking at the Scripts section for the server side scripting in the mean time, but being very new to this. Is it at all possible that someone could let me know how I would fill in a field with data from a specific field in another table, increment that field and then fill in the field within the target table? Thats all I really need to acheive and it would really help me out.

Thank you for all your help so far.

Actually even easier, could I just understand how to set a field as it comes in? If I set an identifier into those mandatory fields then I can trigger on the insert and have the DB grab the entries that I need as it writes the generic identifier.


Are you referring to reference data between tables? A scenario where there are two tables, a and b, and say there is a field “primenumbers” within table a.

During schema creation, you’re able to setup “primenumbers” as a reference data type in table b (you must create it first in table a as whatever data type you’d like, I’d assume integer).

This allows for this column to be related from table a to table b.

Then when you POST to this field in table a. it updates its referenced field in table b.

hope that helps with your original question.