Page 1 of 1

Manual Back order release

PostPosted: Tue Aug 17, 2021 11:50 am
by SBarnes
In manual back order release it uses ManualBOBatch.SystemSettings.ReadBackOrderDetailsListStoredProcedureName to get the procedure to run, where is this set under system configuration?

Re: Manual Back order release

PostPosted: Tue Aug 17, 2021 12:12 pm
by SBarnes
I think I just found out why I can't find it, below is the code that sets it


Code: Select all
ReadBackOrderDetailsListStoredProcedureName = Conversions.ToString(this.Manager.Database.ReadSysData("ManualBORelease", "ReadBackOrderDetailsListStoredProcedureName", "usp_JIWA_ReadBackOrderDetailsList"));


and the following SQL produces no results

Code: Select all
SELECT [RecID]
      ,[Section]
      ,[IDKey]
      ,[Contents]
      ,[Description]
      ,[CellType]
      ,[DisplayOrder]
      ,[SectionCaption]
      ,[ReadOnly]
      ,[ScriptFormatCell]
      ,[ScriptButtonClicked]
      ,[ScriptReadData]
      ,[GridHandlerCode]
  FROM [dbo].[SY_SysValues]
  where [IDKey] = 'ReadBackOrderDetailsListStoredProcedureName'

Re: Manual Back order release  Topic is solved

PostPosted: Tue Aug 17, 2021 12:57 pm
by Mike.Sheen
Logged as DEV-8842.

You can run the script attached to DEV-8842 to add the setting - but the lookup button to select the stored proc won't do anything until the next release with the fix - if you can't wait for that a plugin can handle the button click of the lookup on the system configuration form to show a search for the user to select a stored procedure.

Re: Manual Back order release

PostPosted: Tue Aug 17, 2021 2:23 pm
by SBarnes
Ok the attached plugin will do that but for some strange reason I had to go after the grid in the shown event of the form rather than the setup of the plugin, which would indicate the form is not setup when setup gets called on the plugin??

Re: Manual Back order release

PostPosted: Tue Aug 17, 2021 4:48 pm
by Mike.Sheen
SBarnes wrote:but for some strange reason I had to go after the grid in the shown event of the form rather than the setup of the plugin, which would indicate the form is not setup when setup gets called on the plugin??


Correct - the tabs and grids are created and added to the form dynamically when displaying - so at form setup time the grids are not setup (or even there).

There is a GridAdded event raised by the form:

Code: Select all
Public Event GridAdded(sender As Object, e As System.EventArgs, Tab As SystemSettingTab, GridObject As JiwaFinancials.Jiwa.JiwaApplication.Controls.JiwaGrid, Section As JiwaApplication.SystemSettings.Section)


You could add a handler for that - and if it's the section you're interested in add a handler for that grids button clicked - but your method works just as well.

Re: Manual Back order release

PostPosted: Tue Aug 17, 2021 5:06 pm
by SBarnes
Thanks,

By the way I don't know if this is by design but the manual back order screen will let you allocate stock to accounts on hold, the only reason I know is I had to write plugin code for a customer to stop it?

Re: Manual Back order release

PostPosted: Wed Aug 18, 2021 10:57 am
by Mike.Sheen
SBarnes wrote:Thanks,

By the way I don't know if this is by design but the manual back order screen will let you allocate stock to accounts on hold, the only reason I know is I had to write plugin code for a customer to stop it?


Yes, it is by design - as the name implies - it's "manual" so automation rules are discarded and we let the user do what they want. It would be good to indicate if an account is on hold, I suppose - and perhaps a system setting to control if on-hold customers can have backorders fulfilled... but then that would leave you without work writing plugins!

Re: Manual Back order release

PostPosted: Wed Aug 18, 2021 1:45 pm
by SBarnes
Probably adding an on hold column would be enough.