Acumatica override method in Receivre and Put Away - acumatica

I am looking to customize Receivre and Put Away screen. After an Item code scaned. I want it go to Quantity enter Sacn state.
When an item scaned, should the method ProcessItemBarcode in PX.Objects.PO.ReceivePutAway.cs be called? I put an breakpoint in this method, but it never get hitted.
If it is this method called, how can I override this method? This method is defined as protected not public.
Thanks in advance.

Related

I have added an OnPaint() function to my dialog class but its not getting called after dlg.DoModal()

Can anyone please help me understand how to override OnPaint() for a dialog class derived from CDialog.
Here is the code:
ColorImageDlg *pDlg = NULL;
pDlg = new ColorImageDlg;
pDlg->DoModal();
delete pDlg;
I'm overriding OnInitDialog() and it's getting called.
But while overriding OnPaint() it is not getting called.
Can any one please help me fixing it?
First of all what is the point of creating the instance of the dialog on heap? You can simply do:
ColorImageDlg dlg;
dlg.DoModal();
You need to modify your message map like this:
BEGIN_MESSAGE_MAP(ColorImageDlg, CDialog)
ON_WM_PAINT()
END_MESSAGE_MAP()
Use VS Class Wizard to avoid problems like that.
If you can't use the ClassWizard then there is another way. Here is a resource about it:
(VS2015 version) https://msdn.microsoft.com/en-us/library/dey7ke4c.aspx
(VS2008 version) https://msdn.microsoft.com/en-us/library/dey7ke4c(v=vs.90).aspx)
But basically, once you have defined the dialog resource and attached it to a new class, make sure the Class View tab is selected:
Next, make sure your dialog class is selected in the class view:
Then, click on the Messages icon of the Properties panel:
Scroll down the list of messages and locate WM_PAINT. Then click the dropdown arrow and select the option to add it:
As you can see, it has inserted all the needed code:
Hope this helps.

MonoTouch - how can I pass a value back to my controller from a custom UIActionSheet?

I have a UIViewController with a UITableView. I have implemented a UITableViewDelegate and overridden the RowSelected event to display a custom ActionSheet with UIPickerView i.e. if the user selects a row the ActionSheet displays a list of choices for that row.
What I'm looking to do is ... when the user dismisses the custom ActionSheet (by pressing a Done button), the ActionSheet is dismissed, and the value of the selected item is passed back to the UIViewController for display purposes.
I'm a little unsure as to the best way to handle this. I was hoping someone might have some pointers ?
I think you should subclass UIActionSheet and subscribe to Dismissed and set a property for the value the user selected. (You can also do other work like fill up the action sheet from within the subclass)
Your controller can then subscribe to Dismissed and read your new property.

MonoTouch.Dialog: Dismissing a Keyboard

Using the Reflection API to auto generate a UI.
How can I dismiss the keyboard when the user selects a new field, or if they choose a field which generates a new view to pick from. In the later case, when the user returns to the first screen, the old keyboard is still there.
UIView.EndEditing(bool force);
The above will hide the keyboard for you without needing to know who the first responder is. I haven't done much with the reflection API but you should be able to call that on the view when an element is selected.
Apple Docs -- endEditing:
Clarification for those initially struggling with the MonoDialog portion of the question:
The EndEditing method is not available on DialogViewControllers objects directly (who inherit from UITableViewControllers). You should be calling EndEditing(bool) on the View of a DialogViewController and not trying to call EndEditing(bool) on the actual DialogViewController itself.
For clarification:
DialogViewController dc;
dc.View.EndEditing(true);
Note:
UIView objects include the EndEditing(bool) method, but UITableViewControllers do not inherit from UIView so the EndEditing method is not available on the controller itself. UITableViewControllers contain a view object, call EndEditing on that view object.
Check the ResignFirstResponder method. This one should help you I guess.

LWUIT Dialog problem with dispose()

I am making a dialog with a command. This command must close the dialog and go back to the previous form, but it is not working as expected. When I press the command, it closes the dialog but the form do not go back.
I am using the resource editor. State machine controls the app´s navigation.
The code inside the command´s logic is:
dialog.dispose();
StateMachine.back();
Is dispose() the method that I must use to close my dialog?
Thanks for reading.
As Nirmal said disposing the dialog goes to the previous form so while your call to "back()" works as expected your call to dispose() breaks that logic.
You can override the postShow method for the form you are showing and detect the case of leaving the dialog (just turn on a flag when you need to go back) and call the back method when the form is shown in that condition.
dont call StateMachine.back() just use dialog.dispose();
There is another solution : try to use the protected void onShowCompleted() method that you must implement in your Form. And declare a boolean variable in your Form ( for example private boolean isDialogShown; ), then in the constructor of your Form set that boolean variable to false, and just before the code of opening the Dialog set its value to true. Then in the code of the protected void onShowCompleted() test if it is true , and if it is true then set it to false and perform the back action : backForm.showBack();

FubuMVC: How to I create a zero-model out action on my controller?

In FubuMVC, when I want a controller action method to return a json result, I use the JsonEndpoint attribute on the method. However there is not a corresponding attribute for a void method that I can see.
For a particular action, I don't want to return anything, but if I have a void return result Fubu fails because it starts looking for a view to match an empty model to.
Is there a attribute or easy change to allow a particular action method to return void?
Thanks
When I updated to a newer version of the framework, one-model-in, zero-model-out controller actions became instantly usable. The only thing I'm not sure how to do is controller-less views.

Resources