Dashlets options

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Fernando
    replied
    Hi,

    Got it

    var x = this.getOption('teamId') ))))))))))))))
    Last edited by Fernando; 10-24-2016, 09:36 AM.

    Leave a comment:


  • tanya
    replied
    "Im sorry could you help one more time?"- the last time)))
    Originally posted by tanya
    and linkMuliple field use [fieldName]Ids and [fieldName]Names.... did you try to read a field source?
    var x = this.getOption('teamsIds')

    Leave a comment:


  • Fernando
    replied
    Update something is missing me.


    I tryed:
    var x = this.getOption('teams').get('teamsId');

    And i get the message: Cannot read property 'get' of undefined

    Thanks in advance

    Leave a comment:


  • Fernando
    replied
    In the dashlet configuration i have:
    "Team": {
    "type": "link",
    "view": "custom:views/fields/teams-for-dashlet"

    In the view i tryed almost everthing and i still get this.getOption('teams') to show 'undefined' :
    return 'Opportunity/action/reportByWiStage?Team=' + this.getOption('team') + '&dateTo=' + this.getOption('dateTo');



    Im sorry could you help one more time?

    Leave a comment:


  • tanya
    replied
    client/src/views/fields/link-multiple.js
    Last edited by tanya; 10-24-2016, 08:54 AM.

    Leave a comment:


  • Fernando
    replied
    Sorry i used Teams by mistake.
    I changed from linkMultiple to link so that the user could get just one team.
    In the dashlet option the user defines one team, and i whant to pass the information of that team so that the sql query returns only information of that team.

    "and linkMuliple field use [fieldName]Ids and [fieldName]Names.... did you try to read a field source?" Could you explain this a little better?

    Leave a comment:


  • tanya
    replied
    and linkMuliple field use [fieldName]Ids and [fieldName]Names.... did you try to read a field source?

    Leave a comment:


  • tanya
    replied
    why Teams? if your variable is teams (lower case).

    Leave a comment:


  • Fernando
    replied
    Ok i tryed "this.getOption('Teams')" and i get a "undefied" in the get.
    How can i get the Team so i can make the db query?

    Thanks in advance

    Leave a comment:


  • Fernando
    replied
    Is there any way we can limit the menu so we can only choose one team?
    UPDATE: altered link-multiple to simple link and it solved.

    Another thing and im sorry but how do handle the teams field in the view .js? Can i use "this.getOption('dateFrom')" or "getConfig()"? Does this return the object or something like the id or name of the team field?

    Thanks in advance
    Last edited by Fernando; 10-21-2016, 10:10 AM.

    Leave a comment:


  • tanya
    replied
    yes, it is. Use custom view, develop, what you want

    Leave a comment:


  • Fernando
    replied
    Nice, thanks.
    For what i could check a custom entity doesnt have a "views/fields".
    Is it possible to do the same for a custem entity (an event)?
    UPDATE: It worked using the fields/team view but i dont think that is the right way
    Thanks in advance,
    Last edited by Fernando; 10-20-2016, 11:20 AM.

    Leave a comment:


  • tanya
    replied
    foreignScope of your link field is empty

    matadata
    Code:
    "teams": {
                    "type": "linkMultiple",
                    "view": "custom:views/fields/teams-for-dashlet"
                }
    /client/custom/src/views/fields/teams-for-dashlet.js
    Code:
    Espo.define('custom:views/fields/teams-for-dashlet', 'views/fields/teams', function (Dep) {
    
        return Dep.extend({
    
           foreignScope: "Team"
    
        });
    });
    Last edited by tanya; 10-20-2016, 11:07 AM.

    Leave a comment:


  • Fernando
    replied
    Hi,

    Thanks for the ansker i teste your sugestions but still no luck.
    I get always the same error.
    Any ideas?

    Leave a comment:


  • tanya
    replied
    Hi
    Didn't try it, but type has to be written with camel Case style (in your case - linkMultiple)

    Leave a comment:

Working...