Announcement

Collapse
No announcement yet.

Record Delete Function Suggestion

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Record Delete Function Suggestion

    It is almost not possible to delete a record using formula, is there any chance to have a formula function that does that (delete a given record), like below:

    record\delete(ENTITY_TYPE, ID, [filter optional])

    If filter is added then it will be easy to loop through a collection of Ids and delete only record that much the given filter.

    Thanks

  • #2

    application/Espo/Core/Formula/Functions/RecordGroup/CreateType.php
    application/Espo/Core/Formula/Functions/RecordGroup/FindRelatedManyType.php


    one line in each files to change and then become : RemoveType, RemoveRelatedManyType

    Comment


    • #3
      This works for a target entity:

      Code:
      deleted = true;

      This should work for any entity (did not test though):
      Code:
      record\update(ENTITY_TYPE, ID, 'deleted', true);

      Comment


      • #4
        thanks yuri
        Code:
         record\update(ENTITY_TYPE, ID, 'deleted', true);
        works fine.

        Comment

        Working...
        X