Change log

siyaksiyak Member Posts: 66
Hello good pips

I have a problem with codeunit(423(Change log management)).i've created a form that is doing the verification of customer then i need to write to the change when there's an approval on the customer.it writes to tha change,but it does'nt say that the satus is approved or reject.

I tried to use the function that InsertlogEntry and i have a problem with the fieldRef and xfieldref that i need to call them on my form.please help :oops:

Comments

  • DaveTDaveT Member Posts: 1,039
    Hi Siyak,

    The fieldref and xfieldref are used to see if a record has changed. If I have picked you up correctly, you are deciding when the insert into the log yourself - then why not insert into the log table (405) directly?

    Just run a manual example and mirror that in you code :wink:

    Hope this helps
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • siyaksiyak Member Posts: 66
    I used this code:cChangeLogMngt.LogModification(newVal,oldVal),now i need to call the locals(RecRef and xRefrec) i tried to create two record variables one for new value and other for old value and it complain about those variable
  • DaveTDaveT Member Posts: 1,039
    Hi Siyak,

    Again I think writting to the table is easier but here's code to log an amendment to the item table
    GET( '1000' );
    Oldrecref.GETTABLE( Rec);
    Description := 'Record Modified';
    MODIFY;
    NewRecRef.GETTABLE( Rec);
    Logman.LogModification( NewRecRef, Oldrecref );
    
    

    Basic, I know - but it works
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • siyaksiyak Member Posts: 66
    Thanks man i've already done that,using almost the same code then it works.Thanks again \:D/
  • DaveTDaveT Member Posts: 1,039
    Glad to Help :mrgreen:
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
Sign In or Register to comment.