DELETE Code in Navision

companycompany Member Posts: 89
Hi Everybody,

Any one please tell me how to find where the Sales header record variable is Deleted through 'DELETE' in all Navision Objects using Developer Tool Kit.

I have to write some code in all the places where the Sales header record is deleted using DELETE Command.

I tried in DTK using where used but not finding all the places like Codeuint 80... ](*,)
Please help me..

Comments

  • DenSterDenSter Member Posts: 8,307
    Write some code in the OnDelete trigger of the Sales Header table, that should take care of that.
  • ara3nara3n Member Posts: 9,256
    Daniel he is asking for code where delete(true) is not called.

    DTK doesn't find the code if the code is written like this

    With Sales Header Do begin



    delete;
    end

    The only way I can think of is go to go through objects that have sales header as variable manually.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • DenSterDenSter Member Posts: 8,307
    Well, the way I look at it is wherever the system should run the OnDelete trigger it is set to TRUE, and all other places it is not relevant. I suppose the only way to make sure is to find all of them.

    You could try finding all objects with a sales header variable, and then scan all of those objects for DELETE statements. Still a good number of objects, but that's about all I can think of.
  • companycompany Member Posts: 89
    Thanks for the reply...i will try as you said...
  • jmjm Member Posts: 156
    Hi,

    i did a test and found the usage in codeunit 80.

    I am using DTK Version 2.0 SP3.

    I am searching in the following way:
    - expand tables
    - mark table 36
    - right click -> where used with...
    - Fill "delete" in "Object Command Filter"
    - Start search with OK
    br
    Josef Metz
  • MbadMbad Member Posts: 344
    Only place it should occur if things are coded correctly is on posting, since the posting routines keep track on all the lines(and other entries connected to the header) and deletes those afterwards. Ofcourse this only is for standard navision...
Sign In or Register to comment.