• How to update options after sync in Javascript?

    Hi, we have a multiselect with some deprecated values. The deprecated values should be removed if not in saved values. This is what I tried in the module record..js: _filterLocations : function ( ) { var location_c = this . model . get ( 'location_c'…
  • The Products "Subpanel" on Quotes

    I need to run a script when an item is Saved on the Quote. So you pick a product from the dashlet, it is added to the SubPanel and then you click on the green button to save it. As it is saved I need to check its 'product_template_id' and if it is one…
  • How to do a validation that requires an API call

    I want to add a validation to make sure the email address added to a record is unique. This, of course, requires an API call to go check the current email address to all the others. The problem is, in my validation function, by the time the API call returns…
  • >7.9 set readonly in javascript

    Hi, we are upgrading SugarCRM from 7.6 to 7.9 and setting readonly depending on values in Javascript does not work anymore. Cause the model is availble after rendering, setting a field to readonly has no effect when it's used in this.on('render', ...…
  • Attributes.metadata missing in SugarCRM 8.0.0

    If you examine Sugar 7.8.2.2 using Chrome's DevTools, you'll see that there are many attributes under App.controller.layout.model.attributes , one of those being metadata . If you examine Sugar 8.0.0 the same way, there are much less attributes available…
  • How to restrict Account Create In to Mobile-App sugarCRM 7.* ?

    Hi Everyone, I have restricted account creation in to web(Base) but when I have check same for mobile-app that is not working. Can anyone help how to restrict account creation in to mobile-app. Please check below attachment for reference. Thanks Alex…
  • Get the Team name for logged in user in javascript

    I need to get the logged in user's team in my js file. Tried below method but it gives default teams for that user, but not the actual team where the user resides. app.user.getPreference('default_teams')
  • Set relationship dropdown via javascript controller

    Hi everyone, I'm trying to set a relationship dropdown on the "One" side (One-To-Many relationship) in the create javascript controller. With relate fields I'm able to simply do this: this.model.set('account_c', accountName); this.model.set('account_id_c…
  • Module record pages not working with code following the new Sugar standards

    Hello. I'm using SugarCRM 7.8 Enterprise Edition. I have a package for the module 'Opportunities', which I need to update some javascript / sidecar code to make the CRM updatable to version 7.9, according to what Sugar said in a Internal Case I opened…
  • How can I render a Sugar datetimecombo field anywhere with Sidecar?

    I have a custom block on the page and I want to use the Sugar datetimecombo field there for date and time selection like this: How can I render a field like that somewhere else in my customisation javascript files? I also need to be able to set the value…
  • How to generate GUID in create-action.js sugarcrm 7.* ?

    I want to generate the GUID in create-action.js is there any function in sugarcrm 7.* provide ? Like we use php side 'create_guid()' same anything is there ? Thanks.
  • JavaScript Controller copy one field to another before blanking the first field

    field_one is a drop down and field_two is a varchar. I want to be able to pick a value in field_one , have it populate field_two and then clear out field_one . Sounds simple enough. So I run this code in the on change event: this.model.set(' field_two…
  • Sugar 7 Enterprise - Preventing form from submiting

    Hello. I'm using SugarCRM Enterprise 7.5. I already found a way to validate related fields from the model RevenueLineItems using javascript (backbone.js + underscore.js), and show an error message on the screen. It's being used on the EditView. But I…
  • Sugar 7 - Form submitting before client-side validation

    Hello. I'm using SugarCRM Enterprise 7.5 for production system, and 7.7 for the test system. I'm developing a package for form validation in the RevenueLineItems (it's called 'Receita' in brazilian portuguese) native module. I followed exactly what this…
  • Add javascript in the onclick of a custom button

    Hi, I work with the 7.6 pro version of Sugar and I have added a custom button in the module Quotes that follows the old standard, the 6.7 version. I have added the button with this code in the detailviewdefs.php: 'buttons' => array ( 0 => 'EDIT' , 1 …
  • How to embed javascript in a Sugar Enterprise module?

    Hello. I'm developing on a Sugar Enterprise 7.5.2.4 On-Demand instance. I must do some client-side validation using jquery 'maskedinput' plugin on a field. I already know how to do it in Sugar Community and SuiteCRM, but for Enterprise most people say…
  • How to remove select option using Javascript

    We have a select field and the available options are depending: in edit view I use all, in create view they must be filtered. I tried different ways but nothing works. For example to filter the list before rendering. I have no idea to access the list…
  • Sugar 7 - CreateView field logic breaking form

    Hello. I use Sugar Enterprise 7.7. Only recently I got form validation on page load to work. But there is a problem: the validation I done actually changes the field value by changing it's model value, but it's giving a javascript error, blocking the…
  • Sugar 7 - CreateView not working

    Hello. I'm using Sugar Enterprise 7.5 for production system, and 7.7 for test system. I need to change a datetime module field value in the page as soon as the page is loaded. It's for a custom module. The first solution was to use "calculated fields…
  • How do I dynamically change a list on a CreateView

    I want to change the list of status on the Case create view based on a selection made from a drop down list and the role of a user. I currently have code running which should do this. It will successfully fire when the form is initiated but it does not…
  • Sugar Enterprise 7 - Client-side validation not working

    Hello. I'm using Sugar Enterprise 7.5.2.4. I have a RevenueLineItems module, and need some validations for field and form submit. I have a record.js file for the module, with its destination path defined in the manifest installdefs as: custom/modules…
  • How to format currency amount to current user locale in record.js sugarCRM 7.*?

    can anyone help how can i convert my currency amount in current user locale. I want to convert currency and render in to my own custom view .hbs file. Thanks
  • Generate URL of an image field

    Guys, what is the correct way to generate a url for an image field through JavaScript ? I wanted to generate a Dashlet with the image , but do not know how this works in REST .