Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding a variable to the workflow expression engine
#2
I did a quick test. By default the currect user is set in the assigned_to field. I converted a SO that was assigned to another user and when I arrive at the invoice the assigned_to field is set to my current user, not the one on the SO.
I created a map to change the subject and the assigned_to field was still set to the current user, so no change there.
I added a mapping to assign the Invoice to another user and that worked correctly also.
So, I'd say that you already have the behavior you are asking for.
In any case, the wiki says that you have access to the current user information using the "TEMPLATE" type:

http://corebos.org/documentation/doku.php?id=en:adminmanual:businessmappings:mapping

Code:
When creating a new record you always have access to all the fields of the current user using the FIELD or TEMPLATE types. For example:

$(assigned_user_id : (Users) first_name)


this it the mapping I created:


Code:
<map>
  <originmodule>
    <originname>SalesOrder</originname>
  </originmodule>
  <targetmodule>
    <targetname>Invoice</targetname>
  </targetmodule>
  <fields>
    <field>
      <fieldname>subject</fieldname>
      <Orgfields>
        <Orgfield>
          <OrgfieldName>subject</OrgfieldName>
        </Orgfield>
        <Orgfield>
          <OrgfieldName>sostatus</OrgfieldName>
        </Orgfield>
        <Orgfield>
          <OrgfieldName>_FromSO</OrgfieldName>
          <OrgfieldID>CONST</OrgfieldID>
        </Orgfield>
        <delimiter>;</delimiter>
      </Orgfields>
    </field>
    <field>
      <fieldname>assigned_user_id</fieldname>
      <Orgfields>
        <Orgfield>
          <OrgfieldName>5</OrgfieldName>
          <OrgfieldID>CONST</OrgfieldID>
        </Orgfield>
      </Orgfields>
    </field>
  </fields>
  </map>
Joe
TSolucio
Reply


Messages In This Thread
RE: Adding a variable to the workflow expression engine - joebordes - 12-06-2016, 10:25 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)