This topic contains 4 replies, has 0 voices, and was last updated by tavanpat 9 years, 8 months ago.

  • Author
    Posts
  • #10238

    tavanpat

    Hello,

    I created a workflow to set value for 2 fields on sales Order:

    Location and department

    location is working fine – set value with customer location – trigger after record submit

    then to set the value for the department, I check the location (and I think this is the issue, as it seems it does not see the value of the location ) if location = 2 then department = 3 and if location = 4 then department = 2 – trigger after record submit

    my department field is always blank

    Workflow initiated

    25/2/2015 – 12:16:43.722

    Running ONENTRY trigger under AFTERSUBMIT (Event: EDIT; Context: USERINTERFACE)

    25/2/2015 – 12:16:43.732

    SETFIELDVALUE
    Executed
    25/2/2015 – 12:16:43.746

    Condition: Order Status = Pending Fulfillment
    True
    25/2/2015 – 12:16:43.761

    location = 4

    25/2/2015 – 12:16:43.780

    SETFIELDVALUE
    Executed
    25/2/2015 – 12:16:43.791

    department = null

    25/2/2015 – 12:16:43.822

    Workflow finished

    25/2/2015 – 12:16:43.836

    I tried to do a transition and new state to set the department, but get the same result

    Can you help me?

    Thanks in advance

    Patricia
    This is a cached copy. Click here to see the original post.

  • #10239

    dmatyas

    Hi Patricia,

    it seems like the right side of the SetFieldValue for location got evaluated to NULL. How the condition (if location = 2 then department = 3 and if location = 4 then department = 2) is defined exactly?

    Daniel

  • #10240

    tavanpat

    by a formula select department field to update and select for value formula

    Case when {location}= ‘4’ then ‘4’ when {location} = ‘2’ then ‘3’ end

  • #10241

    evan_goldberg

    You might need to use {location.id}?

  • #10242

    tavanpat

    Thanks a lot, it works

You must be logged in to reply to this topic.