Fields not saving in UBAQ

Good morning from Strongsville, Ohio.

I am looking for some help with creating an updateable BAQ with plans to create an updateable dashboard. The BAQ itself works but two of the fields will not save.

I update the PORel.Date01 and PORel.Date02 fields but they do not save after I hit ‘update’ and then ‘get list’. I have tried various BPM’s but no luck.

Any help would be appreciated!

Best Regards,

Mark Svec

Are you using the built in update functionality that epicor provides via UpdateExt?

I tried using the Business Object: PORelSearch
Update Method: UpdateExt.

The two date fields disappear when I hit Get List.

Is there some custom code I need to add in the BPM possibly?

Thank you for your help.

Actually, I just reran and received this Query Execution Message:

Table: , Level:, Type: 3, RowID: 1, Text: Program:bo/PORelSearch/PORelSearch.p Method:poRelBeforeUpdate Message:This function is not allowed.

PORelSearch is not an updatable Business Object you need to use the PO BO

I thought that might be the case but wanted to give it a try.

I have tried the PO BO before. I might have used the update method though instead of the UpdateExt method. I will try again.

Thank you very much for your quick responses!!!

You may also run into the fields can’t be updated even as UDs with the PO approved. So you may have to unapprove and reapproved pre and post update.

1 Like

Greg,

You called it, nice job!

I just ran the query with the PO.UpdateExt and checked tables I didn’t have originally checked. Things are starting to work. I am getting update not allowed because I’m not authorized and also not allowed because of being approved. Added myself as approved buyer and doing some more testing now.

Thank you Greg and Jose!

So next question that I’m sure could be anticipated.

Is there an easy way to unapprove/approve a PO without having to navigate to the PO Entry screen. It defeats the purpose a little not being able to update the fields just in the table.

Thanks in advance for any advice.

I think I just answered my own question unless someone has a better way.
I can right click on the PO in the dashboard to quickly get to PO entry.

Thank you!

There is. I am out today, but I will look to see if I have abl code to do that when I am back next week.

Greg,

Thank you. Don’t spend too much time on though if you can’t find. Right clicking to go to PO entry to unapprove, make change in table and then approve isn’t bad at all.

Have a nice weekend.

I had some down time, so I looked at my old .p files. I do not have an unapproved/reapprove, but found a PORel advanced update that should be a start on doing this.

/* update PORel */

def var buyer as logical init false.
define variable InfoMsg as character init ''.
define variable Msg as character init ''.


For Each ttResults where ttResults.RowMod <> '' on error undo, next:

	For each PORel where PORel.Company = cur-comp and PORel.SysRowID = ttResults.PORel_SysRowID exclusive-lock.
		
		
		For first PurAgent where PurAgent.Company = cur-comp and PurAgent.BuyerID = dcd-userid.
			If  PurAgent.InActive = true then next.
			Buyer =  true.
		End.
		
		
		If Buyer = false then Do.
						
						InfoMsg = "Only Buyers can update".

						{lib/PublishInfoMsg.i &InfoMsg = InfoMsg}.	
		
		End.

		If Buyer =  true then 
					PORel.CheckBox01 = ttResults.PORel_CheckBox01.
					PORel.DueDate = ttResults.PORel_DueDate.
					PORel.PromiseDt = ttResults.PORel_PromiseDt.
	End.

End.

Greg,

Thank you very much!!

I am going to keep experimenting with the dashboard and try to add the unapprove/approve logic soon based on what you sent me.

The good news is, even without this logic, I have a nice dashboard I am going to introduce to purchasing and project managers this week.

Thank you very much for your help!

Have a nice week.

You and Jose have made this a good experience for my first time on this forum.

Mark

2 Likes

Good afternoon. I am working on the unapprove/approve portion of this UBAQ.

The pre-processing Directive works and I can unapprove the PO and make my updates in the Base Processing. Any direction on how to get the Post-Processing PO Approving to work?

Post processing is after the update, so you won’t have changed any longer and you may not have a current record. I would use a routine like the .p I posted to lop thru them and reapprove. You may have to set something in the record to know which to reapprove.

did you try the .p to just set the Date fields without having to unapprove/approve?

Greg,

Thank you very much. I went down a rabbit hole of trying un-approve and approve and got close but no success. I am fairly new to this type of coding but modified my UBAQ a little to add the SYSROWID and used your code with the fields I cared about and it works!! No worries about approving and unapproving.

Thank you very much!!!

I will post my results for others to look at if they want.

Mark

1 Like

Following are some screenshots of the Open PO Dashboard I created with help from Greg and Jose.




1 Like