Thanks for your reply.
we are trying to integrate Posting with our asp.net application , thats why we are using GL http service and coding through C# .net and not x++.
We are successfully posted entry, but when we are using default dimension in our code then system is giving error 'Object reference not set to instance of an object'.
With same code for Default Dimension, if i manually export the posting file as excel and give to client they can successfully post it manually.
So need to know where we are wrong in our c# code.
The Code that i have done for Default Dimension is as below.
AxdType_DimensionAttributeValueSet defaccount = new AxdType_DimensionAttributeValueSet();
AxdType_DimensionAttributeValue difdimValue1 = new AxdType_DimensionAttributeValue();
difdimValue1.Name = "Employees";
difdimValue1.Value = DefaultDimensionEmployees;
AxdType_DimensionAttributeValue difdimValue2 = new AxdType_DimensionAttributeValue();
difdimValue2.Name = "Location";
difdimValue2.Value = DefaultDimensionLocation;
defaccount.Values = new AxdType_DimensionAttributeValue[2] { difdimValue1, difdimValue2 };
//journalLine.DefaultDimension = defaccount;
journalLine.DefaultDimension = defaccount;
When i am trying to post this, 'i received Object reference not set to an instance of an object.'
Can you help what is wrong in above code?
Regards,
Momin
Excel file that we have posted successfully.
[View:/cfs-file/__key/communityserver-discussions-components-files/33/CostFile_5F00_June_2D00_2020_5F00_Emp-104-_2D00_-Copy.xls:320:240]