Adding Dimension Values To An Item Journal Line

Jonathan2708Jonathan2708 Member Posts: 552
Hi,

I'm trying to write some code that will automatically populate item journal line dimensions when the user keys values in a particular field in the Item Journal screen. The dimensions in question are both global and non-global dimensions so need to be added directly to the 'Journal Line Dimension' table. However I'm getting various error messages which I think are mainly centred around the fact that the journal line does not get it's "Line No." populated until a certain number of fields have been populated. Without knowing the new "Line No." I cannot add the Journal Line Dimension record.

Has anybody written this functionality (or similar) before?

Any help appreciated,

Jonathan

Comments

  • David_SingletonDavid_Singleton Member Posts: 5,479
    I have done this efore, but not had any problems. I don;t see why you have problem calculating th line no.

    its just Line no. += 10000;
    David Singleton
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Actually just re-reading I see the issue is with the journal line number, not the dimension line.

    So just look at the sales order sub form and the code on the "No." field to see how this is solved.
    David Singleton
  • Jonathan2708Jonathan2708 Member Posts: 552
    Hi,

    Thanks for the reply. Yes it's the fact that the "Line No." on the journal line remains 0 that's causing me the problems. I'll take a look at the sales subform for inspiration.

    Jonathan
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Hi,

    Thanks for the reply. Yes it's the fact that the "Line No." on the journal line remains 0 that's causing me the problems. I'll take a look at the sales subform for inspiration.

    Jonathan

    just that its better to show you where the fish are biting than to throw you a fish :wink:
    David Singleton
Sign In or Register to comment.