Setting a custom field on a sales order  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Setting a custom field on a sales order

Postby jeromeh » Fri Sep 12, 2014 4:50 pm

I am trying to set an historical custom field on a sales order in JIWA 7 using the JIWA DLLs

MyJiwaSalesOrder.CustomFieldValues("WebRef").Contents = webid

Used to be done as above in JIWA 6.5.

How would I do this is JIWA 7? and is there a reference I should be using to find this information myself?
jeromeh
Occasional Contributor
Occasional Contributor
 
Posts: 17
Joined: Wed Apr 08, 2009 9:53 am

Re: Setting a custom field on a sales order  Topic is solved

Postby Mike.Sheen » Fri Sep 12, 2014 5:41 pm

jeromeh wrote:I am trying to set an historical custom field on a sales order in JIWA 7 using the JIWA DLLs

MyJiwaSalesOrder.CustomFieldValues("WebRef").Contents = webid

Used to be done as above in JIWA 6.5.

How would I do this is JIWA 7?


Hi Jerome,

The custom fields attached to the sales order header are in a property of the sales order named CustomFieldValues. To set the desired value, you need to locate the one in the collection related to the custom field - ie:

Code: Select all
For Each customFieldValue As JiwaApplication.CustomFields.CustomFieldValue In salesOrder.CustomFieldValues
    If customFieldValue.CustomField.PluginCustomField.Name = "WebRef" Then
        customFieldValue.Contents = "test"
        Exit For
    End If
Next


Attached is a plugin which demonstrates this.

Plugin Sales Order Set Custom Field Contents.xml
Sample Plugin
(33.23 KiB) Downloaded 184 times


jeromeh wrote:and is there a reference I should be using to find this information myself?


As mentioned here, there is on-line reference material - most of it is auto-generated, but we are expanding it with more useful content as it becomes apparent which areas need more detailed content - such as here.

Mike
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 3 guests

cron