Options

Sales Cue, new Sales Orders /month

Hello,

is it possible to create a cue that show´s all the new sales orders in the active month?
somethin like this...
Count("Sales Header" WHERE (Document Date=FIELD(Date Filter2)))
...but with this :p
Count("Sales Header" WHERE (Document Date=FIELD(this month)))

Answers

  • Options
    Jan_VeenendaalJan_Veenendaal Member Posts: 206
    Yes, of course.

    1. Create a FlowFilter field (let's say you call it "this month") in the Sales Cue table, datatype = date

    2. Create a Flowfield (e.g. "Orders This Month") in the same table with Calcformula: Count("Sales Header" WHERE (Document Date=FIELD(this month)))

    3. Set the correct filter on the 'this month' field:
    SalesCue.SETRANGE("this month",CALCDATE(TODAY,'<-CM>'),CALCDATE(TODAY,'<CM>'));

    4. SalesCue.CALCFIELD("Orders This Month");
    Jan Veenendaal
  • Options
    263985f0a2263985f0a2 Member Posts: 5
    Hello Jan,

    thank you for your help! This is how far i came.
    1. I created a new field with the field class flow filter, data type: date.
    2. I created a new field with the field class flowfield, data type: integer, and following filter:
    CalcFormula Count("Sales Header" WHERE (Document Date=FIELD(this month)))
    3. I don´t know, how to filter in a field from the data type date :sweat:
    4. Same thing here, would you be so kind and tell me a little more detailled?

    Thank´s a lot!
    A stranger! :P
  • Options
    mohana_cse06mohana_cse06 Member Posts: 5,503
    Open the page
    add SalesCue.SETRANGE("this month",CALCDATE(TODAY,'<-CM>'),CALCDATE(TODAY,'<CM>'));

    in OnOpen Page trigger.
  • Options
    263985f0a2263985f0a2 Member Posts: 5
    Ah ok i see, thank you very much!
    seems like my license doesn´t allow page design :( can´t open C/AL Code
  • Options
    mohana_cse06mohana_cse06 Member Posts: 5,503
    probably you are using Customer license.
    you need partner license to do this.
  • Options
    Jan_VeenendaalJan_Veenendaal Member Posts: 206
    I agree with Mohana
    Jan Veenendaal
  • Options
    263985f0a2263985f0a2 Member Posts: 5
    Ok thank you very much for your help! I will aks my nav partner if it´s possible to get the partner license!
  • Options
    gmsfzllcgmsfzllc Member Posts: 12
    Open the page
    add SalesCue.SETRANGE("this month",CALCDATE(TODAY,'<-CM>'),CALCDATE(TODAY,'<CM>'));

    in OnOpen Page trigger.

    When I am putting this code, system generate some error.

    Please check in attachment.

  • Options
    Jan_VeenendaalJan_Veenendaal Member Posts: 206
    The two parameters of CALCDATE should be switched: first the text (dateformula), then the date:
    SalesCue.SETRANGE("this month",CALCDATE('<-CM>',TODAY),CALCDATE('<CM>',TODAY));

    [ you could check the online help for the complete definition of the CALCDATE function ]
    Jan Veenendaal
Sign In or Register to comment.