cancel
Showing results for 
Search instead for 
Did you mean: 

Account Assignment within AccountingEntry.Item

Former Member
0 Kudos

Hi All,

I am able to create a Journal Voucher from custom BO via AccountingEntry create/submitforposting/post along with Cost Centre ID assignment.

However, I am unable to assign value to the Project Task field - there is no sub node for it and after populating the possible element FinancialAccountingViewOfProjectTaskReference I find that it doesn't get passed into the item when the JV document is created.

Some of the coding I use is as follows (lines 73-75 do not seem to work).

During Debugging I see that these fields do get the values I expect to pass.

An attempt to post these values resulted in the following - Type PRO / Project task value did not get assigned:

Maybe I am using the wrong element - from the repository explorer I used:

Hoping someone might be able to help!!

Regards

Jay

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jayash,

You must place the ID of the task in the "FormattedID" field:

local.FinancialAccountingViewOfProjectTaskReference.FormattedID = val;

I hope to help you,

regards,

Joe Gonzales

Former Member
0 Kudos

Hi Joe, Thanks for your response previously.

Have tried various versions of your and other coding but for some reason only Cost Centre assignments can be added via coding.

Also tried with Custom Z Object assignments - during debugging I can see that all typecode values are correct but they are not being passed to the new instance "local".

I then tried moving the parameter (eleJVitem) values directly into the instance (local) as shown below and it seems to work now (for custom Z Object assignments)!!

I will have try something similar with the Project Task Reference at some point in the future

Jay

Answers (0)