How to deploy custom extensions on AOS modules, studio omitts files

Hello community,

as an absolute newby on suitecrm I want to implement a small solution based on
some custom extensions for AOS_Quotes, AOS_Product_Qoutes (line_items) and AOS_Invoices.

My dev-system is version 7.11.18, Sugar Version 6.5.25 (Build 344) running on Debian 10.

After reading a lot of posts in this forum, I went through the following steps:

  1. Added a couple of fields (some textfields, some relates), identically in AOS_Quotes and AOS_Invoices.
  2. Customized converToInvoice.php to transport custom fileds also (only changed SQL near line 115)
  3. Added some custom fields to AOS_Product_Qoutes (1 date, 1 relation to users)
  4. Customized Line_Items.php and line_items.js :
    A bit tricky, in this case some fields should only be viewable for special users.
    So I had to make changes to Line_Items.php also.

I got all that running on my dev-system thanks to the helpful explanations in this forum.

Especially helpful was the post of
TedMoriello about upgrade safe Line_Items.php: Upgrade Safe Line_Items.php for AOS_Products_Quotes
Thank you.

Now I am a bit stucked in figuring out how to deploy my custom fields and associated code safely, relaiable (esp. repeatable) to test- and production systems.

I’m aware that (as often discussed) AOS_Product_Qoutes/line_items are not really customizeable via studio.
My findings where:

a. Custom fields in line_items can be defined in studio, as they show up in the DB, but the views have to be implemented in Line_Items.php and line_tems.js .

b. Custom Line_Items.php has to be assigned to AOS_Quotes and AOS_Invoices by assigning in f.e. custom/Extension/modules/AOS_Quotes/Ext/Vardefs.

c. When exported from studio (I thougt that import via Admin/ModuleLoader might be the preferred way to deploy) all went well, but some files where missing on the target system.
Missing files where:

  • custom/modules/AOS_Products_Quotes/Line_Items.php,

  • custom/modules/AOS_Quotes/converToInvoice.php

    The files already miss in the zip exported by studio,
    When I add them namually to the zip, they were not installed.
    I haven’t yet tried editing the manifest.php in the zip.

What is preferred way to deploy extensions on standard modules to test- and production systems.
I guess there might be better solutions than ftp-ing the files in their appropriate places.

If you’re already deep into code customization, and you can keep all your stuff under custom folder, then I don’t see much of a reason to go back to Studio or Module Loader. Just deploy your custom files directly.

Thank you very much for such fast response.
I’m a little concerned about that the modules I customized could be managed in studio furthermore.
(please excuse, I’m not native english)
What if the customer tries to add more fields to f.e. Qoutes in the future and wants do do this via studio?

Whish you a pleasent easter day.

You’ll have to work that specific scenario and see if you can pull it off. It might not be an easy task.

You would need to ensure that your code is ready to pick up the field list from what is done in Studio, and adapt to it.

Or alternatively, have your own configuration files and instruct the client on how to use them.

Any way, if that is not a specific requirement they have right now, maybe it’s better to just warn them that your changes required moving away from Studio, going beyond what it allows, and now any further changes will need to be done with code.

Happy Easter also to you!

1 Like

a) and b) You are right. Custom line items have to be defined and pointed to in those modules.

c) For copying the modified files, you can place them in package and use copy param in installdef of the manifest file. you have to edit the manifest and put the files in the zip too.

The preferred method is via Module Loader zip package but if you are struggling with that then use the Old method of copy/paste to server.

1 Like

Thank you for your advice. Just took al look into manifest.php, seems to be very easy.
Just get the manifest.php out of the zip,
In the array named ‘copy’ (near the end ) , add a last (upnumbered) entry, such as

49 => array (

‘from’ => ‘Extension\modules\AOS_Quotes\converToInvoice.php’,
‘to’ => ‘/bitnami/suitecrm/custom/modules/AOS_Quotes/converToInvoice.php’,
),

Add manifest.php to the zip again and don’t forget to add also your custom file (in this case Extension\modules\AOS_Quotes\converToInvoice.php).

I’ll try that soon and report success (i hope).

:grinning:

You might also find this helpful:

1 Like

Thank you, and yes, already thought about automatin g this.
Great that its already done.
I’ll try that at the next opportunity.