Skip to main content
Question

Custom Field on Customer Orderlines

  • Dec 27, 2022 4:20 PM UTC
  • 5 replies
  • 335 views

Forum|alt.badge.img+8

Hi! 

I am adding a Custom Field to Customer Order Line and need some help.

The field I am trying to add is Numeration group field that you found under Customer/Invoice/General tab.

 

I chose Read Only, gave Name and then tried with some Arguments but I get error message in the end, “Error in validation of custom field attribute…”

Does anyone try to help me how to write Arguments and Select Statement?

 

Thanks. 

 

5 replies

EqeRobertK
Superhero (Partner)
Forum|alt.badge.img+15
  • Superhero (Partner)
  • Dec 28, 2022 8:54 AM UTC

Hi @Asadan ,

You can use the folling statement with argurment (the custom field I created is C_FIELD)

Argument:

v.customer_no, v.contract

Select:

SELECT C.CF$_C_FIELD FROM IFSAPP.IDENTITY_INVOICE_INFO_CFV C
WHERE C.COMPANY = IFSAPP.COMPANY_SITE_API.GET_COMPANY(:CONTRACT)
AND C.IDENTITY = :CUSTOMER_NO
AND PARTY_TYPE_DB = 'CUSTOMER'

Hope this wil help you,

 

Robert


Forum|alt.badge.img+8
  • Author
  • Sidekick (Customer)
  • Dec 28, 2022 3:51 PM UTC

Thank you for your reply, however, it still doesn’t work. I am trying to fetch value with Read Only from standard filed called “NUMERATION_GROUP” from identity_invoice_info_tab. 

So I think it should be something like below? But this didn’t work… 

 


EqeRobertK
Superhero (Partner)
Forum|alt.badge.img+15
  • Superhero (Partner)
  • Dec 29, 2022 9:24 AM UTC

Hi @Asadan ,

Why are you using both customer_id and customer_no?

customer_id does not even exist in the customer order line, so this will not work.

Another thing is the hard copy ‘30’ as a company. I am not sure how many companies you have, but I would notmake that hard copy. With my select you can see how to solve this.

so you can use the following for the numeration group field:

Argument:

v.customer_no, v.contract

Select:

SELECT C.NUMERATION_GROUP
FROM IFSAPP.IDENTITY_INVOICE_INFO C
WHERE C.COMPANY = IFSAPP.COMPANY_SITE_API.GET_COMPANY(:CONTRACT)

AND C.IDENTITY = :CUSTOMER_NO

AND PARTY_TYPE_DB = 'CUSTOMER'

 

Hope you will manage,

 

Robert


Forum|alt.badge.img+8
  • Author
  • Sidekick (Customer)
  • Jan 25, 2023 7:16 AM UTC

Hi Robert, thank you for your replay and I tried your select but it still doesn’t work… If someone could have done this please post here so I know it should be something wrong in our environment. 


EqeRobertK
Superhero (Partner)
Forum|alt.badge.img+15
  • Superhero (Partner)
  • Jan 25, 2023 7:24 AM UTC

Hi @Asadan ,

Please have a look at 

 

There @Link pasted a document about how to create a custom field. Maybe that document will be helping you out on this.

Good luck,

Robert