Search This Blog

Wednesday 29 August 2012

How to create a free text invoice and than make interest note against the FTI and than settle the payment against the interest and interest fee in Dynamics Ax 2012



Free Text Invoice:

A free text invoice is an invoice that is not attached to a sales order. A free text invoice contains a header and one or more lines for items or services that are not tracked in inventory. Use a free text invoice for sales that do not require a sales order, packing slip, and customer invoice. For example, you can use a free text invoice for a consulting fee or services fee, or for a miscellaneous fee for an event reimbursement.

Step 1:Creating the free text invoice:

Note:I will show you the data using the com company so you should load com data.

Goto Account Receivable->free text invoices->all free text invoices.

Now click the new->free text invoices in the action pane.

Now in the free text invoice header.

Select customer account=RCUS000016.

Billing Classification=UTL.

Now in the invoice lines.

Select Billing Code=WTR_SWR.

Amount=500.

Below is the screen shot you can also refer to it.
 


Now click the post button in the action pane you can also see in the above image.



After clicking the post button a new dialog box will open as shown in the below image.


Now click on the ok button.Your Invoice will be posted successfully and your invoice number will be generated as shown in the below image.
 
 

 
Step 2:
Calculate an Interest note for above created FTI.
Navigate to AR>Common>Customer Invoices>Open customer invoices.
Select the FTI Invoice created in step 1 as shown in the image below.





Click on 'New interest note-> Invoice' action pane menu item.
-On the Interest calculation form select Bliing classification = 'UTL', Invoice = checked, From date= 6/1/2012', To date= 8/22/2012'
As shown in the image below.
 






Now click on the ok button.The interest is calculated as

 

Step 3:Now we will post this calculated interest Navigate to AR>Periodic> Collection >Interest note-Select the Interest note for Customer RCUS000016 in your scenario may be other customer.-Click the Post button
 
 

On the Post interest note form, change the Print status as 'No' on select query.
-Set Posting date = Current date.
-Click Ok.
 

After Clicking the ok post button the calculated intrest note will posted as you can see in the below image.
 
 

Now create the credit payment of amount 50.This means that the customer has paid the amount 50 against the invoice and its interest note and interest fee.

Click Navigation Pane node: Accounts receivable -> Journals -> Payments -> Payment journal.

Create a new record in the Journal form.

And than select name=custp as shown in the image below.
 
 

Now click on the lines button as shown in the image above.

A new journal voucher form will open.

Now select the account number and than enter the credit payment of amount 50.

Now select the Post -> Post menu button as shown in the image below.

 
 

Now the payment will be posted and infolog will appear as shown in the image below.
 



 
 
Settle the Interest note fee and Interest invoices
Click Area Page node: Accounts receivable -> Customers.
Select Customer account =’RCUS000016’
as shown in the image below. Click the Collect -> Settle -> Settle open transactions button. as shown in the image below.
 
 

The Settlement form will open.Now mark the interest and interest fess and the payment.and unmark the payment.
 
 

Note that we unmark the invoice because we only want to settle the interest and interest and dont want to settle the invoice against the payment.

Now click on the update button your payment will be settled against the interest and interest fees.

Click Area Page node: Accounts receivable -> Customers.

Select Customer account =’RCUS000016’

as shown in the image below.

Click the Customer -> Transactions -> Transctions button.

as shown in the image below.
 
 

Now click on the tractions buttone you will see all transactions that we have done and which transaction is settled.
 

 Note that we have settled the interst note and interst fees so that these transactions should be close now you can also check which transaction are close after settlement.

Go to Account Receivable->customers->all customers->

select your customer

than click the collect ->settle->closed transaction editing

as shown in the image below.

 

 

 
 Thanks :)

Sunday 12 August 2012

Error 1069: The service did not start due to a logon failure

This type of issue can be occur when user changes its system password and due to change of password reproting service could not be start.Due to this issue SSRS reporting can also not be installed in Microsoft Dynamics Ax.

The execution needs to be redefined whenever the password is changed.

There are some easy steps to resolve this issue:
Step1:Goto Start Menu -> All Programs -> Microsoft SQL Server 2008 -> Configuration Tools

Now click on this the below window will open.


Now click connect and than you see the menus in the left hand side just click that Execution Account as shown in the image below.

Give your credentials here and then click apply and than it will take some time than your Reporting Service will Start.

type services.msc in the start menu and than press enter a new service window will open here search for Sql Server Reporting Services.You can see in its status menu that its start or not if its not start than right click and select start..

I hope this post will help your issues :)

Thanks

Muhammad Zahid

Thursday 9 August 2012

How To Make Partition In Dynamics Ax 2012

Partitions:         

A partition is a unit of isolation in the AX database
The concept is similar to a company for company specific tables except it is applied to almost all tables
The exceptions include tables related to batch processing, enterprise portal, and services.

Motivation:

A new partition can be used to isolate unit tests and their data from a deployment that has data loaded or that has been corrupted by previously running unit tests

The server team will not accept “partition bugs” that are unit test specific. In other words, unit tests are not a supported scenario, but I have not seen any problems that could not be fixed.

Steps For Making Partitions:

Its quit easy to make partiitions in Dynamics Ax 2012.Just follow the following steps below:

Step 1:Just go to the System Administration->Setup->Partitions as senn below in the image.


















Step 2: Now click the partitions new form will open in that form you will see the existing partitions.You can add the new partition by clicking ithe add button and than give the partition key and partition name as shown in the image below.



Step 3:Now close the form and go to the microsoft dynamics ax configuration as shown in the picture below.


Step 4:Now Microsoft Dynamics Ax configuration utility will open.Now go to Manage and than select create configuration 


Now enter the configuration and than click on




Now enter the name of the partition that you want to apply.and than click apply and than press ok.


Now Run your Microsoft Dynamics Ax your partition will work as i shown in the image below.



Now there is another easy option for running your partition without doing this configuration
just open the command promt and than write the following command.

ax32.exe -partition=partitionname -company=companyname

An example is shown in the picture below


Now if you are planning to run a unit test  on a newly created partition than you need to first initialize the partition without this,many unit tests will fail with a sequence number error in a new partition.
to initialize the partition please run the below job:

NumberSeqApplicationModule::loadAll();
SysUnitTestData_DIR::setupNumberSequences(NumberSeqModule::DIR);
info('done');


Note:

If your unit test use the FIM unit test data(FimUnitTestDataFinancial class) in an existing TTS may still fail in unit test set up.
    The solution is make sure the FIM unit test data in not created in a TTS as shown below.The FIM unit tests data handles its own TTS.





 Thanks

Muhammad Zahid.


Wednesday 1 August 2012

Number Sequence in Dynamics AX 2012

Number Sequence:

The primary purpose of the number sequence framework is to provide unique, user-friendly identifiers while maintaining a continuous or non-continuous alphanumeric sequence.

Number Sequence should be the unique and user friendly.

Rec ID is also the unique but it is not user some times the dev requires the user friendly number.

The main core concepts are use in Number Sequence.

1. Segments

2. Scope.

Segment:
               Segment is basically the part of a Number Sequence that can be easily identifiable.

For example: A Student Enrolment Number.

BSCS:EP-086:171

Here BSCS is the degree type and department programe.

EP corresponds to evening programe.

08 is the year of admission

6 is the month.

and finally 171 is the roll numbe of  the student.

The above all segements combine to make a unique understandable Number Seqence.

Scope:
           Scope is basically the combination of segments used for a specific transaction or master data entity.

Example:Company + Fiscal Calender Period

value:DMO-Jan2011.

For Number Sequence we will use the Extended Data Types.
         Each Segment has its own EDT and an EDT using for sequence number can only be use for in
single module.
        We can not use same EDTs in more than one module if it is use as a Sequence Number.And EDT should be of String type.

Steps for Implementing Number Sequence:

Step 1: Make Extended Data Type of type String.Make its length above than 25 its depend on your choice but it should be the above than 25.I have nade that EDT as Enrolment Number.

Step 2:Now the point is in which module you are implementing the Nunber Seqence.I am Implementing in Human Resource Module so i will modifify the loadmodule method of
Class NumberSeqModuleHrm and write the following code.


datatype.parmDatatypeId(extendedtypenum(enrolmentnumber));
datatype.parmReferenceHelp(literalstr("enrolment number"));
datatype.parmReferenceLabel(literalstr("Enrolment number"));
datatype.parmWizardIsContinuous(true);
datatype.parmWizardIsManual(NoYes::No);

datatype.parmWizardIsChangeDownAllowed(NoYes::No);

datatype.parmWizardIsChangeUpAllowed(NoYes::No);

datatype.parmWizardHighest(999999);

datatype.parmSortField(12);

this.create(datatype);


In the above code I am basically defining the Extended Data Type that will be use for the Number Sequence.Help literal strings i.e Enrolment Number.Bascailly we use here labels.So when you Implementing put there Label.

ParmWizardContinious means Auto Incremented.There are two types Contonious and Manual.In Manual the user can manually edit or modifiy the Number Sequence. 

datatype.parmWizardIsChangeDownAllowed and datatype.parmWizardIsChangeUpAllowed is basically the option we can set is yes or no.Is use for example the user created 10 number sequences and than deleted 2 number sequence from the middle and when the next time the if the user is creating New Number Seqeunce than he can enter deleted values or not to remaing in the sorted order.


datatype.parmWizardHighest(999999) this showing the maximum value for the
EDT.


datatype.parmSortField(12) is basically the sorted value for the number of Number Sequences in a particular module. 
this.create(datatype); This line is basically calling the create method to create this Number Sequence.

Step 3:Now Create a  job and than write the following code.

NumberSequenceModuleSetup obj=new NumberSequenceModuleSetup();
 

obj.loadData();
 

info('Done');

The loadData method in above code is basically laoding data of all modules.In whicn our enrolement numer will also be load. 
When you run the job the Enrolment Number EDT will be load for the
Number Sequence as shown in the picture below.


 The form will open when you go to the Human Resource->Setup->Parameters->Human Resource Shared Parameters.


Step 4:Now made a numRefEnrolmentNumber method in the parameter table.Every module contains the parameter table.Parameter table is basically use to made the settings of the module.Now add the below method in the parameter table.The name of the parameter table of the Human Resource is HRMParameters.


static client server NumberSequenceReference numRefEnrolmentNumber()
{
    return NumberSeqReference::findReference(extendedTypeNum(enrolmentnumber));
}


The above method is basically returns the refrence of  the EDT Enrolement Number.

Step 5: Now I will create the student table to show the demo of the Number Sequence.Add two fields in the student table i,e Enrolment Number and Name of the student. These two fields should be extended from the EDT.

Step 6:Now add the following method to the in the student table to set the Number Sequence to Enrolement Number field.

public void SetEnrolmentNumber()
{
    NumberSeq num;
    NumberSequenceReference numberSequenceRefrence;
    numberSequenceRefrence=HRMParameters::numRefEnrolmentNumber();
    if(numberSequenceRefrence)
    {
        num=NumberSeq::newGetNum(numberSequenceRefrence);
        this.enrolmentnumber=num.num();
    }
}



Step 7:Now i will create the Simple List Details form to show the generated Number Sequence on that form.

Step 8:Now write the following method on that Student form that I have created above.


public NumberSeqFormHandler NumberSeqFormHandler()
{
    if(!numberSeqFormHandler)
    {
       NumberSeqFormHandler=NumberSeqFormHandler::newForm(HRMParameters::numRefEnrolmentNumber().NumberSequenceId,element,student_DS,fieldNum(student,enrolmentnumber));
    }

    return numberSeqFormHandler;
}


Step 9:Now add the Create,Delete and Write methods on the DataSource node of  the Student Form.

public void create(boolean _append = true)
{
    element.NumberSeqFormHandler().formMethodDataSourceCreatePre();
    super(_append);
    element.NumberSeqFormHandler().formMethodDataSourceCreate();
}


public void delete()
{
    element.NumberSeqFormHandler().formMethodDataSourceDelete();
    super();


public void write()
{
    element.NumberSeqFormHandler().formMethodDataSourceWrite();
    super();
}


Step 10:Now the final thing you should create the number sequence format its Segments and Scope.Just go to the:

Organisation Administration->Common->Number Sequences->Number Sequence

and click new New Number Sequence in the action pane.




  Now set the Number Sequence code and Scope Parameter that can be shared  accross the companies or to the particular company  and than the Segments.





Now Close the Form and than go to the Human Resource->Setup->Parameters->Human Resource Shared Parameters and than select the Number Sequence Code against Your number Sequence Enrolment Number.



Now Run the form that we have created earlier to see the Number Sequences.You can see below in the image.



Thanks :)