Adding New Field to a form

Sapphire123Sapphire123 Member Posts: 112
Hi All,

I've added a new (boolean) field to 'job journals' form; and have made required changes, such as, adding this field to the table(s). However, wehn I try to post journal lines with this field enabled (set to True), the value does not carry through to the history table -i.e. job ledger entry- What am I missing? I thought, all values automatically posts through... ?

Thanks in advance!

Comments

  • SavatageSavatage Member Posts: 7,142
    edited 2008-03-13
    Usually ledger tables be it customr/item/vendor/job are not editable for reg customer licenses. if this is not an issue for you. then you can make sure the fields Name & numbers are the same one your from and to tables.

    past that - you can look at teh codeunit that is run when you post and look in there to see how the fields are being transfered.

    perhaps codeunit 10201 can be used - I don't use the Jobs part so I can't readdy get too spacific.
  • KimDynKimDyn Member Posts: 35
    If the TRANSFERFIELDS function is being used on the fields between the tables are the same (Field No., Field Name, Size, etc) it will carry through.
    Kimberly Weir
  • Sapphire123Sapphire123 Member Posts: 112
    hmmm.. the post function from the job journal eventually ends up calling a codeunit, 'Job Jnl-Post Batch'. Unfortuately, i dont see 'TRANSFERFEILDS' function defined in this CU.. :?: but, i've verified that hte new field defined in both tables have the same name, no, and type...
  • SavatageSavatage Member Posts: 7,142
    Codeunit 10201 "Transfer Custom Fields" has triggers for
    JobJnlLineTOResJnlLine(VAR JobJnlLine : Record "Job Journal Line";VAR ResJnlLine : Record "Res. Journal Line")
    
    JobJnlLineTOItemJnlLine(VAR JobJnlLine : Record "Job Journal Line";VAR ItemJnlLine : Record "Item Journal Line")
    
    JobJnlLineTOGenJnlLine(VAR JobJnlLine : Record "Job Journal Line";VAR GenJnlLine : Record "Gen. Journal Line")
    
    JobJnlLineTOJobLedgEntry(VAR JobJnlLine : Record "Job Journal Line";VAR JobLedgEntry : Record "Job Ledger Entry")
    

    http://www.mibuso.com/forum/viewtopic.php?t=23299
  • SavatageSavatage Member Posts: 7,142
    hmmm.. the post function from the job journal eventually ends up calling a codeunit, 'Job Jnl-Post Batch'

    I fyou want to look into using this way I would suggest looking at
    Job Jnl.-Post Line codeunit.

    From my observations
  • Sapphire123Sapphire123 Member Posts: 112
    thank you so much, it worked! i modified the trigger to transfer the custom field..
  • SavatageSavatage Member Posts: 7,142
    Hopefully that redeems myself from that "Invisible button" post :mrgreen:
Sign In or Register to comment.