Understanding the Custom Module life cycle

Hello,

I would like to make sure that I understand what happens to an imported module in SugarOnDemand.

Here is what I have observed:

  1. I import a custom module via Module Loader.
  2. The module is now visible in Module Builder.  I can make changes to fields/view at will.  I do not see the module in Studio, nor can I expose it with a tab via Display Modules and Subpanels.
  3. I now deploy the module.  The module is no longer visible under Module Builder.  It does appear in Studio and I can expose it now  via Display Modules and Subpanels.

All correct so far?

Several questions then.

  1. At the post-deployed stage, it appears that I can add new fields, change field sizes and change layouts.  But it appears that I cannot delete a field?  Is that correct?  Is there no way to delete a field once a module has been deployed?  What if I had several large fields that I no longer needed, but wanted to get rid of so they didn't count against my maximum record size?
  2. After deployment, can I now export the module in its most current state?

Thanks.

Bryan Hunt

  • Hi Bryan,

    I would agree with most of what you have here. 

    Here is what I have observed:

    1. I import a custom module via Module Loader.
    2. The module is now visible in Module Builder.  I can make changes to fields/view at will.  I do not see the module in Studio, nor can I expose it with a tab via Display Modules and Subpanels.
    3. I now deploy the module.  The module is no longer visible under Module Builder.  It does appear in Studio and I can expose it now  via Display Modules and Subpanels.

    All correct so far?

    Was this a module created in another instance's Module Builder and then exported? If you're building and creating in the same instance, I would say you can skip using Module Loader. Either way, after a module is deployed, best practices suggest you do not make further changes in Module Builder. There is a very useful Help Guide explaining this in a few different sections: Best Practices When Building Custom Modules. I strongly recommend following the steps there if you have not read through it yet. I'd also recommend reviewing Understanding Module Builder's Functions for additional insight into Module Builder. 

    At the post-deployed stage, it appears that I can add new fields, change field sizes and change layouts.  But it appears that I cannot delete a field?  Is that correct?  Is there no way to delete a field once a module has been deployed?  What if I had several large fields that I no longer needed, but wanted to get rid of so they didn't count against my maximum record size?

    After deployment, in Studio, these fields are treated basically the same as any other out-of-the-box field in another module (e.g. Contacts, Accounts, etc.). There's no way (through Studio) to delete the fields, but an easy workaround is to change the Max Size of the fields. There may be other options available as well if that need arises. 

    1. After deployment, can I now export the module in its most current state?

    You can export your field customizations as explained in this section of the Administration Guide. I believe that this plus the original Module Builder export file would fill this need. 

    I hope this helps!

  • Alex and Vijay,

    Thanks for both replies.

    Let me ask about a specific case and its behavior.

    I have two demo sites set up.  In the first one I create a package and a new module.  I deploy the module, make more changes in Builder and deploy again.  I go through this change/deploy cycle several times.

    Now I export the module to a zip file.  I take the zip file to my second demo site and import it.  I use module builder there to make additional changes and I deploy it.  The module is seen in Studio and I have a tab for it.

    But, my package/module is no longer in Module Builder?  It looks like the deploy step deleted it?  Is that expected behavior?

    I wanted to go through the update/deploy process several times in the second instance too.

    Thanks.

    Bryan Hunt

  • So here is what I believe to be true:

    If you create a module in module builder and deploy it, it stays in module builder and can be updated and redeployed over and over.

    If you import a module into module builder and deploy it, it is removed from module builder.  There is no chance to update and redeploy.

    I have not found any documentation to confirm this, but from my observations this appears to be the case.

    Thanks.

    Bryan