CoreBOSBB
Sale order to invoice custom item field - Printable Version

+- CoreBOSBB (https://discussions.corebos.org)
+-- Forum: Support (https://discussions.corebos.org/forumdisplay.php?fid=17)
+--- Forum: Administrator Support (https://discussions.corebos.org/forumdisplay.php?fid=8)
+--- Thread: Sale order to invoice custom item field (/showthread.php?tid=1693)



Sale order to invoice custom item field - addady2 - 01-30-2020

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?


RE: Sale order to invoice custom item field - omarllorens - 01-30-2020

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.


RE: Sale order to invoice custom item field - addady2 - 02-18-2020

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?


RE: Sale order to invoice custom item field - omarllorens - 02-19-2020

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.


RE: Sale order to invoice custom item field - addady2 - 02-19-2020

(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


RE: Sale order to invoice custom item field - joebordes - 02-19-2020

I think those are supported directly. can you reproduce in the demo?


RE: Sale order to invoice custom item field - addady2 - 02-19-2020

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>


RE: Sale order to invoice custom item field - joebordes - 02-19-2020

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.


RE: Sale order to invoice custom item field - addady2 - 02-20-2020

Thank you, Its work, my misunderstanding.