Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using the standard 'create invoice from salesorder' in workflows
#8
Next up is the default value for the due date. You should not need to setup the workflow task to get the duedate offset. This is better done using (Field) Mapping Business Mapping


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

This type of business mapping serves to define field values to capture when converting from one module to another, but it also serves to set default values when creating a new record. You can achieve this by creating a mapping with the same module name for both sides, for example, in this case Invoice2Invoice. Just to test it I created the mapping below and now when I create a new invoice my due date is set to 30 days from today.

Code:
<map>
  <originmodule>
    <originname>Invoice</originname>
  </originmodule>
  <targetmodule>
    <targetname>Invoice</targetname>
  </targetmodule>
  <fields>
    <field>
      <fieldname>duedate</fieldname>
      <Orgfields>
        <Orgfield>
          <OrgfieldName>add_days(get_date('today'), 30)</OrgfieldName>
          <OrgfieldID>expression</OrgfieldID>
        </Orgfield>
      </Orgfields>
    </field>
  </fields>
</map>

   

we must get the workflow task to use this mapping because with that you can define ANY field as you like without having to modify the workflow and it will also serve for normal user creation.

give that a try just to get a hang of how incredibly powerful the mappings are and how much you can really customize coreBOS now without touching to much code.

I continue....
Joe
TSolucio
Reply


Messages In This Thread
RE: Using the standard 'create invoice from salesorder' in workflows - joebordes - 08-07-2016, 03:48 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)