This topic contains 2 replies, has 3 voices, and was last updated by Red 7 years, 4 months ago.

  • Author
    Posts
  • #16318

    Eldon Neustaeter
    Member
    @eldon_neustaeter

    I need to a workflow that checks for the LAST editor of a transaction (journal entry), compares it to the current logged in user and if the same, hide the approve button.

    I have this working so that the createdby user cannot approve their own journal: (see below to hide approve button) :

    {custworkflow_createdby.id} !={user.id}

    but now I also need to hide the approve button if {user.id} = last editor. {systemnotes.name} give me last editor but it is ALL of the last edits… How do I pull out just the 1 most recent from a list?

    /e

  • #16319

    Adolfo Garza
    Member
    @adolfo_garza

    This one is tricky. The only way I can think of is doing it by suitescript because that way you can set the sorting of the results by the system notes date and then grab the first result.

    • This reply was modified 7 years, 5 months ago by Adolfo Garza.
  • #16389

    Red
    Member
    @red_magbojos

    You could create a workflow field that is changed every time record is submitted. The field would contain user and triggered on before user submit. Just make sure that you trigger this action if you have multiple states.

You must be logged in to reply to this topic.