Problem - countConditional in custom module

Hi,

I created for my company a custom module with the module builder and want to display a statistic tab with calculated fields. I started with some counts on related modules (contacts, opportunities, ...) and they work just fine. Now I need related entries with specific statuses.

Creating a calculated field referencing contacts like this works:

countConditional($my_module_contacts_1,"custom_status_c",createList("termin"))

Now I tried referencing to opportunities in a specific sales stage: 

countConditional($my_module_opportunities_1,"sales_stage",createList("Lead"))

Sugar sees no error in this code, but when I try to open any object from my module I get an error stating

HTTP:404 Not Found.

Page does not exists or insufficient rights. Contact your Administrator.

I don't have a clue why the first works and the second doesn't .

My Company is using the Enterprise Edition 7.9.3.x

Parents
  • Probably some enpoint returned error 404.

    Open developer tools in the Chrome/Firefox (F12), at the developer tool go to tab network and retry. Hopefully you will see an errored end point call (red highlighted). Let us know the entire endpoint and its information (request, response).

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • Wow, you're great. Logging with F12 showed the URL is generated with all fields as short URL term. It was just a coincidence it happended while referencing another module than contacts. 

    I deleted some calculated fields from my module and 

    countConditional($my_module_opportunities_1,"sales_stage",createList("Lead"))

    displays everything as promised.

    On crash parameters are:

    1. Request Method:
      GET
    2. Status Code:
      404 Not Found
    3. Remote Address:
      xxx.xxx.xxx.xxx
    4. Referrer Policy:
      no-referrer-when-downgrade

    It has to be a limit of one kind, but I don't know where it is. I tried increasing our IIS max length, looked in the php's from sugar and tried different browser (firefox should be able to resolve the URL). Is there a work around with that long link or any idea how to increase the possible size?

Reply
  • Wow, you're great. Logging with F12 showed the URL is generated with all fields as short URL term. It was just a coincidence it happended while referencing another module than contacts. 

    I deleted some calculated fields from my module and 

    countConditional($my_module_opportunities_1,"sales_stage",createList("Lead"))

    displays everything as promised.

    On crash parameters are:

    1. Request Method:
      GET
    2. Status Code:
      404 Not Found
    3. Remote Address:
      xxx.xxx.xxx.xxx
    4. Referrer Policy:
      no-referrer-when-downgrade

    It has to be a limit of one kind, but I don't know where it is. I tried increasing our IIS max length, looked in the php's from sugar and tried different browser (firefox should be able to resolve the URL). Is there a work around with that long link or any idea how to increase the possible size?

Children