User Reserved Fields on Powerforms (P421002)

eriley

Active Member
In P42101 there is a subform P421002 that is used to enter/update SO. I would like to use the user reserved fields to store data and would like to add them to that subform. I added a field to the subform using a DD variable that matches the user reserved field in the F4211. How do I get the data that is entered into the column in the subform to be saved in the F4211? I cannot find any MBFs that I would normally see in the P4210.
confused.gif
 
Here is one method that I have used before. It is not as easy to do as the P4210. Create a subform function on the detail line subform. In this function loop through the grid lines and update the F4211 with the data from the DD items you added to the grid.

In the parent form, in the OK button post button clicked, there is a function call to save the order I don't recall the name. (its not end doc, but calls the end doc) After this function, call the subform function you just created.

This eliminates the need to write a caching function, which would be a huge challenge if you are not a C programmer.
 
Is the function call to save the order your refering to called N4210430 - Invoke Localization? This is the only BSFN in the event that would do anything. There is one in the button click that looks like it edits the data based on the form action its passing in of ED1. The form action passed in the post button is CSD which has to do with the country designation which basically does nothing for us.
 
Would this be what I need to code in the subform function?

Get Max Grid Rows(FC SOLines, VA evt_ACLF_MaxRowCount_CNT)
VA evt_ACLF_RowNumber_CNT = 1
While VA evt_ACLF_RowNumber_CNT is less than or equal to VA evt_ACLF_MaxRowCount_CNT
Get Grid Row(FC SOLines, VA evt_ACLF_RowNumber_CNT)
F4211.Update
SI szOrderCompany = TK Order Company (Order Number)
SI mnOrderNumber = TK Document (Order No, Invoice, etc.)
SI szOrderType = TK Order Type
GC Line Number = TK Line Number
GC Delivery Deadline -> TK User Reserved Date
VA evt_ACLF_RowNumber_CNT = [VA evt_ACLF_RowNumber_CNT]+1
End While
 
I am calling the subform function in the OK Button Post Button Click but just prior to calling my subform function I stop the code in debug to check to see if the record exists in F4211 and it does not, so my subform function code will not update. Anyone know when/where the end doc gets called and I can call my subform function?
 
I went back to look at the mod I did to see why you are having trouble. You need to copy the "Sales Order Application Controller-External" function from the Async event to the post button clicked event. You may need to also uncheck the "Include in Transaction" option. Be sure to disable the function call in the Async event. Call your subform function after the controller function.
 
It worked. Thanks for your help Scott. Learned a little about powerforms and thats good.
 
Hi eriley & Scott,

I just have the same request as eriley.
Could it be possible to have more details on what you did to manage to make the fields of F4211 like URAB, URCD and URRF being saved with the lines modifications?

Regards,
 
Hello,
I am on release 9.0, tools 9.1.3.4.

I am having a similar issue. I am in P42101 adding a new order. I enter the customer number and save. I want to assign a value to the grid URRF in the P42101 (if statement) and save to F4211 URRF. I have put in breakpoints and MD debug in the order edit business function (custom function). At the very end of the business function the value exists in the F4211 URRF field. I stopped the business function with MD Debug. As soon as I "OK" out of MD debug, the value is blanks out in F4211 URRF. I am still searching to find out where the order edit function is called. The value does not exist in the subform and I am wondering if I need to add the field to the grid in the subform to save it. I have never worked with power forms and subforms before.
 
Many of the larger applications in EnterpriseOne such as Sales Order Entry, Purchase Order Entry, Workorder Entry, Voucher Entry, Invoice Entry and including the Address Book application use Master Business Functions (MBF) to update the database. Therefore, these applications are designed to not update based on the business view of the form or grid, but rather the updates occur within the Master Business Function.

For example, if you double click on the Address Book Revisions form in Form Design and choose Options, notice the 'no update' buttons are selected for both form and grid business views.

In order to add a new field to an application that uses the Master Business Function to insert and update records, the field must be passed as a parameter within the Master Business Function.

For the Address Book Application, it is necessary to do the following steps to use a User Reserved Control:

Go into Event Rules and find all calls to the 'Address Book - MBF' Note: The easiest way to find the master business function may be to print the ER to a file and then do a search for Address Book MBF.
Open up the data structure and pass the new form controls (URDT, URAB, etc.) to the appropriate parameters.
Once the new form controls are passed into the Master Business Function calls at the appropriate event rules, data entered into these fields should update the table appropriately.
 
I am working on P42101. We have requirement to update F4211 and custom table just after Order is committed. So in P42101 on "OK" button from Event Post Button Async , I commented the "Sales Order Application Controller - External (B4210900)"and moved it to OK Button click event. Now after this BSFN I execute my custom code and update the F4211 and Custom table. Updation works. But the P42101 form does not close and it stays with the data. However the cache is committed to database and record is created in F4211. If we again Press "Submit & Close" it gives error. I even tried to use Set Behavior but still form does not close.

Any idea why form P42101 does not close. Thanks for your help.
 
Read Scott Beebes post carefully. He said "...copy the "Sales Order Application Controller-External" function from the Async event to the post button clicked event"

The key word there is "post". Not the Button Clicked event - the Post Button Clicked event.
 
Looks like you double posted on this problem. See your other thread for my more detailed response, but I think it may have to do with transaction processing.
 
Hello Larry/Boster,

Thanks for your help. Larry you are 200% correct. I got the issue. It was because of the logic on Button click. I moved the code to Post Button click and everything works. Thanks for your God send advice.
Thanks Boster I uncheck the Transaction processing also. Everything works now. Wow.
 
Back
Top