I’m trying to do a customization and need some help. In Part Maintenance under Revisions and then Comments, I would like to pull this information into my Purchase Order detail line Comments box. With examples I got from this forum, I tried to do the same, but being fairly new, I might be missing something.
With my section of code, I am looking at the PartNum and RevisionNum change in Purchase Order detail. However, I am getting an error. Can someone take a look at this code snippet and see what I need? Seems like the textbox txtCommentText.Value or “Text” doesn’t exists? The error I am getting is “The name ‘txtCommentText’ does not exist in the current context”. How would I reference an existing textbox and pre-populate it?
Make a messagebox to see what you are reading…do you have access to a debugger ?
I personnaly did this via use a Method directive during a save of a sales order to make such “transfer” of comments…On a condition that new record, or Part rev or partnum has changed I use code to then read from the Partrev table …
simple example: on the ChangePartNumMaster of sales order…
Didn’t think about using Method Directives. Still very new to Epicor and learning what can and cannot be done. This is actually much simpler without having to do any customization within the program.
I tried your approach and need a bit of help.
So I created a condition that if ttPODetail.RevisionNum field change row is not “”, then execute the code.
I am using Post-Processing since I want it to populate the “Comment” textbox after RevisionNum is populated. After enabling the method directive and saving it, I went to test my PO. Nothing is coming over and I know there’s Revision comments for this part. Am I not using the right directive type?
I really like the solution propose by Hogardy using BPM with Method Directive Maintenance. I’m running into a bit of an issue and doesn’t seem to be triggering it. What is the difference between the following:
Pull comment from PartRev and updating the PO -->Lines–>comments. In this case I just want a pop up message to test to ensure it triggered it. However, I am not getting anything.
I found the pop-up below and seems to be working somewhat. It only pop-up if I change the “RevisionNum”. If it auto-populate the RevisionNum when I change part number, it doesn’t fire off the pop-up.
I did tried that as well without luck. It works if my Method Directive code is set to Erp.PO.ChangeDetailPartNum. However, I want to trigger it when there’s a revision value.
I see…well assuming it is valid to transfer comments on a part change OR or revision change…Maybe use the update method instead?
On new row call your custom code
On a changed row, if field partnum has changed or if revisionnum has changed
call your custom code.
I’ll probably have to play some more with this BPM. I like it that you don’t have to really customize the program, but just the BPM. However, I am on a time crunch and so will go back to what I initially started with the example from Chris_Conn and take a closer look at this at another time.
Chris,
I am able to get the comment and insert it into a textbox I created. However, I am still unable to insert it into the txtCommentText textbox in the Revision Tab in purchase line detail.
Then in my PO detail change, this is my code. Am I missing something? If I just put it in txtComment.Text, which is a textbox I created than it works fine. However, it will not work if I put it in the Epicor comment textbox txtCommentText.
For whatever control you are trying to add it to, are you copying that controls GUID?
You can also look at the EpiBinding field of the control (example, Part.Description) and do:
var edv = oTrans.Factory(“Part”);
edv.dataView[edv.Row][“Description”] = “Your value to set”;
This is what I want to add my comment to is the PODetail.CommentText. So I went and copied the EpiGuid from here. However, kept getting error that “The name ‘txtCommentText’ does not exist in the current context”.