is it possible to retain local variable or rule input values after which gets refreshed during Submit action and use them before submit action gets completed?

Certified Associate Developer

List of task is represented from which I can deactivate particular required task 

Before deactivating task, I need to check if that task is present as precedent task for any other task or that itself should not have any precedent task

currently after clicking on deactivate icon I am getting validation msg but its for all task, but i want it for only particular task that has been used as precedent task

I need to give show When condition to validation msg for that I need task name, but due to submit link used for deactivate icon all values saved are getting refreshed

is it possible to retain that values and used to show validation msg

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    I do not understand what you are trying to do here. We need more details.

  • 0
    Certified Associate Developer
    in reply to Stefan Helzle

    we have given a list of Task along with deactivate icon (minus-square rich text icon), for this icon submit link has been used so that if user want to deactivate any task, then user can click on that icon and soft delete that task from list
    Now current requirement is like when we click on deactivate icon it should not get deactivate if that task is used and dependent task for any other task in the list and a validation error msg should be shown under that task to user notifying this dependency
    So due to this Submit link, all local variables or rule input gets refreshed and lose their updated value which holds the results for checking dependency, current task name for which deactivate icon has been clicked, because of this we are not able to show the validation msg for desired task 

    Issues i am facing are:

    - with Submit Link / Button: 

    it executes the Deactivation action for non-Precedent Task 

    but fails to show validation msg on UI (in Design interface validation msg is showing up)

    -with Dynamic Link:

    successfully shows the validation msg on UI if task is used as precedent task, but fails to deactivate task which is not used as precedent task

     

  • 0
    Certified Lead Developer
    in reply to poojag0013

    The requirement can be achieved without the submit link. Instead we can use a!dynamicLink() and in saveInto(), call the a!writeToDataStoreEntity(), if the conditions satisfy to soft delete the task. If the conditions does not satisfy, show the validations. In case you want to update some other details like audit during soft delete, you can still achieve this by using a!startProcess() in the dynamicLink saveinto.

  • 0
    Certified Associate Developer
    in reply to Sooraj Pushparaj

    tried  implementaing this, saveInto is not accepting a!startProcess()
    and for a!writeToDataStoreEntity() we need to give DataStore Entity, for defining entity we need CDT and we are not using CDT for defining tables

  • 0
    Certified Lead Developer
    in reply to poojag0013

    Here is an example for the saveInto:

    Also you can you use a!writeRecords() in lieu of a!writeToDataStoreEntity().

Reply Children
No Data