Lookup custom field select issue  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Lookup custom field select issue

Postby Riyaz » Thu Dec 09, 2021 1:35 pm

Hi There

We have a strange issue with lookup custom field on PO lines, whenever a value is selected from the lookup its not shown in the custom field dropdown, but when you save the PO or click somewhere else from the dropdown it shows the value chosen. Please see the attached plugin and kindly guide us here. Thanks
Attachments
Plugin VS - Custom Fields.xml
(50.44 KiB) Downloaded 990 times
Riyaz
Kohai
Kohai
 
Posts: 254
Joined: Wed Dec 02, 2015 2:05 pm
Topics Solved: 2

Re: Lookup custom field select issue

Postby SBarnes » Thu Dec 09, 2021 2:22 pm

On setting a system setting I do the code below, I am pretty sure the custom field works in the same way that you need to set the display value as well as the contents when you change it, your code is only changing the contents.


Code: Select all
      if (SystemSetting.IDKey == "ImportDir" )
      {
         using(var fbd = new System.Windows.Forms.FolderBrowserDialog())
         {
             DialogResult result = fbd.ShowDialog();

             if (result == DialogResult.OK && !string.IsNullOrWhiteSpace(fbd.SelectedPath))
             {
                 SystemSetting.DisplayContents = fbd.SelectedPath;
                SystemSetting.Contents = fbd.SelectedPath;
                
             }
         }
         
         
         
         
      }
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191

Re: Lookup custom field select issue

Postby Riyaz » Thu Dec 09, 2021 3:29 pm

Hi Stuart

Thanks I had already tried that with no luck, even with CustomFieldValue.RecID
Riyaz
Kohai
Kohai
 
Posts: 254
Joined: Wed Dec 02, 2015 2:05 pm
Topics Solved: 2

Re: Lookup custom field select issue

Postby Riyaz » Fri Dec 10, 2021 4:06 pm

Hi There

Need some guidance with this please
Riyaz
Kohai
Kohai
 
Posts: 254
Joined: Wed Dec 02, 2015 2:05 pm
Topics Solved: 2

Re: Lookup custom field select issue  Topic is solved

Postby Mike.Sheen » Tue Dec 14, 2021 3:10 pm

Looks like a bug.

Logged as DEV-9093 - as a work-around you can just manually set the grid cell text yourself within the ButtonClicked method in the LineCustomFieldPlugin class.
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: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Lookup custom field select issue

Postby Riyaz » Tue Dec 14, 2021 7:45 pm

Hi Mike

Thanks for the work around, I tried but get concurrency conflict error, pls see the error and the plugin attached FYI
Attachments
Plugin VS - Custom Fields.xml
(50.64 KiB) Downloaded 1220 times
concurrencyconflict.png
concurrencyconflict.png (29.47 KiB) Viewed 7000 times
Riyaz
Kohai
Kohai
 
Posts: 254
Joined: Wed Dec 02, 2015 2:05 pm
Topics Solved: 2

Re: Lookup custom field select issue

Postby Mike.Sheen » Wed Dec 15, 2021 12:16 pm

That error is not related - it's because you added this line:

Code: Select all
CustomFieldValue.RecID=.Fields(2).FieldValue & " - " & .Fields(3).FieldValue


Don't do that!

Remove that line and the error no longer occurs.
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: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Lookup custom field select issue

Postby Riyaz » Thu Dec 16, 2021 12:35 pm

Thanks Mike
Riyaz
Kohai
Kohai
 
Posts: 254
Joined: Wed Dec 02, 2015 2:05 pm
Topics Solved: 2


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 5 guests