web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Integration in project invoice proposals and project accounting parameters , based upon no of days added in parameters , the end date and invoice date should be updated? Please refer the description below for clear understanding!!

(0) ShareShare
ReportReport
Posted on by

Hi ,

In project mangement and accounting  ->project invoices-> project invoice proposals

when we add new , a dialog will appear , in which we have end date and invoice date set to default current date..

here the customisation is we have add a new field in  project accounting parameters, that will be no of days 

isuppose  no of days  we hv entered as 15 and our current date is 13 /may then it should reflect  the end date and invoice date should be last month last date that will be updated with 30/ april.

But if we have entered no of days as 10 but our current date is 13 may , in this case  there must be no updating in the end date and invoice date.

Can anyone help me out how to achieve this??

I have the same question (0)
  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at
    RE: Integration in project invoice proposals and project accounting parameters , based upon no of days added in parameters , the end date and invoice date should be updated? Please refer the description below for clear understanding!!

    Hi,

    If this is a modification that has been implemented then I would suggest that you talk to the one that created this modification.

    He/she should be able to explain what this modification is doing and how it behaves.

    Best regards,

    Ludwig

  • Community Member Profile Picture
    on at
    RE: Integration in project invoice proposals and project accounting parameters , based upon no of days added in parameters , the end date and invoice date should be updated? Please refer the description below for clear understanding!!

    Its not been implemented,  ..

    I just wanna know how to counter this and what kinda code to be written to achieve this scenario and how??

  • Suggested answer
    Rahul Mohta Profile Picture
    21,032 on at
    RE: Integration in project invoice proposals and project accounting parameters , based upon no of days added in parameters , the end date and invoice date should be updated? Please refer the description below for clear understanding!!

    try date functions and datevalue  to validate

    docs.microsoft.com/.../xpp-date-run-time-functions

  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at
    RE: Integration in project invoice proposals and project accounting parameters , based upon no of days added in parameters , the end date and invoice date should be updated? Please refer the description below for clear understanding!!

    Hi nil,

    I see.

    What is it exactly that you expect from the community?

    Do you expect a code sample how to achieve what you describe above?

    Would be great if you could clarify.

    Many thanks and best regards,

    Ludwig

  • WillWU Profile Picture
    22,361 on at
    RE: Integration in project invoice proposals and project accounting parameters , based upon no of days added in parameters , the end date and invoice date should be updated? Please refer the description below for clear understanding!!

    Hi nil,

    You could use prevMth() method to get last month and use endmth() to get the last day of previous month.

    Please put your codes in the onmodified event of your new field.

      static void LastOfprevMonth(Args _args)
        {
            Date TransDate=today();
            Date LastOfMth;
            
            Date prevdate=prevMth(TransDate);
    
            LastOfMth=endmth(prevdate);
    
            info(date2str(LastOfMth,123,2,2,2,2,4));
        }

  • Community Member Profile Picture
    on at
    RE: Integration in project invoice proposals and project accounting parameters , based upon no of days added in parameters , the end date and invoice date should be updated? Please refer the description below for clear understanding!!

    Yes , Dr .Ludwig Reinhard could you  please help me out with code?

  • Community Member Profile Picture
    on at
    RE: Integration in project invoice proposals and project accounting parameters , based upon no of days added in parameters , the end date and invoice date should be updated? Please refer the description below for clear understanding!!

    Hi, Mr Will  Wu could you please explain the last line of code

    (LastOfMth,123,2,2,2,2,4).

    Whats that numbers indicate?

  • WillWU Profile Picture
    22,361 on at
    RE: Integration in project invoice proposals and project accounting parameters , based upon no of days added in parameters , the end date and invoice date should be updated? Please refer the description below for clear understanding!!

    Hi nil,

    This is the parameter of the date2str method.

    https://docs.microsoft.com/en-us/previous-versions/dynamics/ax-2012/reference/aa857241(v=ax.60)?redirectedfrom=MSDN

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 1,771

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 806 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 542 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans