Creating an extra table in code

lock
push_pin
done
Answered
6

Hi All,

Is it possible to create, and modify the structure of a table in code using REST API's, for easy deployment of a cusom application.

Many thanks,

Trevor

10 Mar 2025 | 04:53 PM

All Replies (6)

No, modification/creation of extra fields and extra tables is currently not implemented through NetServer (So also not available in the services layer/REST api). Only way to this programmatically for now is to create custom REST endpoints in CRMScript. 

10 Mar 2025 | 04:56 PM

Hi David,

Thank you for your very quick response.  So are you able to programatically make table changes in CRM Script.  I did have a look in the CRM Script guide, and couldn't see anything on creating extra tables or modifying its structure.  I could only see code for adding and removing records to an extra table.

Many thanks,

Trevor

10 Mar 2025 | 05:01 PM

Your right, no native CRMScript classes are available for that, you could insert them manually using SearchEngine, although i would refrain from that.

 

Other option is to using the recently added installPackage global function to add the extra table/fields using the package xml.

10 Mar 2025 | 05:48 PM
Hi David,

Thanks for confirming that. I cannot see any documentation on this, but this would be a good option if we could install the package via code.

Thanks again,

Trevor
10 Mar 2025 | 05:52 PM
See https://docs.superoffice.com/en/automation/crmscript/reference/CRMScript.Global.Void.html#CRMScript_Global_Void_installPackage_String_
10 Mar 2025 | 05:57 PM

That's brilliant David, thank you.  I'll take a proper look at this tomorrow, but it looks pretty good.  Thanks for your help on this.

10 Mar 2025 | 06:00 PM

Add reply