Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sale order to invoice custom item field
#1
Hello,

I add to Sale order and Invoice custom item fields.
Now when I create Invoice from the Sale order I want that those fields to be pupolat auitomaticaly.

Dose (Field) Mapping Business Mapping support custom item fields?
Reply
#2
Hi.

Yes, you can set your custom fields on this Business Map. When say fieldname put your custom field name, something like cf_xxx , where xxx is a number.
Reply
#3
It work for me in Sale order to invoice custom field but not in Sale order to invoice custom item field.

For example:
cf_1026 to cf_1031 (Sale order to invoice custom field) work
cf_10211 to cf_10671 (Sale order to invoice custom item field) work

Code:
<map>
  <originmodule>
    <originname>SalesOrder</originname>
  </originmodule>
  <targetmodule>
    <targetname>Invoice</targetname>
  </targetmodule>
  <fields>

   <field>
      <fieldname>cf_1031</fieldname>
      <Orgfields>
        <Orgfield>
          <OrgfieldName>cf_1026</OrgfieldName>
        </Orgfield>
      </Orgfields>
    </field>

   <field>
      <fieldname>cf_10671</fieldname>
      <Orgfields>
        <Orgfield>
          <OrgfieldName>cf_10211</OrgfieldName>
        </Orgfield>
      </Orgfields>
    </field>

  </fields>
</map>

BTW: why the ID of custom item field is 5 digit

Am I missing something?
Reply
#4
Sorry I don't understand the difference between custom field and custom item field. For me, both are custom fields.

Do you refer with item word to a special field type?

About your question "why the ID of custom item field is 5 digit?"

This number is the ID generated in vtiger_field table. I guess this field is one of the last ones you created and the 4 digit field you created it a long time ago.
Reply
#5
(02-19-2020, 09:15 AM)omarllorens Wrote: Sorry I don't understand the difference between custom field and custom item field. For me, both are custom fields.

Do you refer with item word to a special field type?

I mean corebos custom field in Sale order/Invoice product line.

I add them using business map, more information take a log on this blog post (and vedio example):
https://blog.corebos.org/blog/inventorydetails


Attach sceenshot

Thank you


Attached Files Image(s)
   
Reply
#6
I think those are supported directly. can you reproduce in the demo?
Joe
TSolucio
Reply
#7
I reproduce the bug in the demo env.

Steps:

Create two item custom fields:

sale order item remark
text 99
cf_1145

invoice item remark
text 99
cf_1146

Create tree business maps:

SalesOrderInventoryDetails

<map>
<originmodule>SalesOrder</originmodule>
<targetmodule>InventoryDetails</targetmodule>
<linkfields>
<originfield>lineitem_id</originfield>
<targetfield>lineitem_id</targetfield>
</linkfields>
<sortfield>sequence_no</sortfield>
<detailview>
<fields>
<field>
<fieldtype>corebos</fieldtype>
<fieldname>cf_1145</fieldname>
<editable>1</editable>
<mandatory>1</mandatory>
<hidden>0</hidden>
</field>
</fields>
</detailview>
</map>


InvoiceInventoryDetails

<map>
<originmodule>Invoice</originmodule>
<targetmodule>InventoryDetails</targetmodule>
<linkfields>
<originfield>lineitem_id</originfield>
<targetfield>lineitem_id</targetfield>
</linkfields>
<sortfield>sequence_no</sortfield>
<detailview>
<fields>
<field>
<fieldtype>corebos</fieldtype>
<fieldname>cf_1146</fieldname>
<editable>1</editable>
<mandatory>1</mandatory>
<hidden>0</hidden>
</field>
</fields>
</detailview>
</map>


SalesOrder2Invoice

<map>
<originmodule>
<originname>SalesOrder</originname>
</originmodule>
<targetmodule>
<targetname>Invoice</targetname>
</targetmodule>
<fields>
<field>
<fieldname>cf_1146</fieldname>
<Orgfields>
<Orgfield>
<OrgfieldName>cf_1145</OrgfieldName>
</Orgfield>
</Orgfields>
</field>
</fields>
</map>
Reply
#8
your invoice map is incorrect, it is always the same custom field if you want the values to pass from one to the other

as you have it now, you are editing cf_1145 in SO and cf_1146 on Invoice, they are not the same field so they do not pass. I changed the Invoice map to use cf_1145 and it worked.
Joe
TSolucio
Reply
#9
Thank you, Its work, my misunderstanding.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)