0

Delete all attachment from a specific record using the ninoc code

Hello support,

How can I delete all the attached files from a specific record using the ninox code?

Greetings

A Green

7 replies

null
    • Birger_H
    • 5 yrs ago
    • Reported - view

    This is not (yet) possible :-(

    Birger

    • james_deraps
    • 5 yrs ago
    • Reported - view

    And Birger it is possible to delete only one attachment with programming code

    • Birger_H
    • 5 yrs ago
    • Reported - view

    If that attachment is displayed in an Image field you can:
    –––
    'image field' := null
    –––

    Birger

    • Cegep de jonquiere
    • James_Deraps.1
    • 5 yrs ago
    • Reported - view

    Yes I know that,  but if I use directly in the attachment, no way?

    • Jorg
    • 5 yrs ago
    • Reported - view

    Hi James, 

    The wish for a function to delete one or all or specific attachments from the "Attachments" tab is already added to our "Change requestes" database. We hope to be able to release it in one of our upcoming versions.

    Kind regards, Jörg

    • Ninox
    • Bilguun_Gantulga
    • 4 yrs ago
    • Reported - view

    Hello Guys I found an alternative for this problem.

    You have to duplicate the current record, which will transfer all the data except the attachments and image fields.

    After that you have to delete your original record;

    For instance your button code will look like:

    let new := duplicate (this);

    delete this;

    openRecord(new) 

    • Ninox
    • Bilguun_Gantulga
    • 4 yrs ago
    • Reported - view

    P.S. Be careful with this one! It might not transfer everything!

Content aside

  • 4 yrs agoLast active
  • 7Replies
  • 2129Views