Add memo for a UD Table

I have a customized UD Table where it’s been requested that I give it the ability to open Memo Entry and type in memos.
I can’t get the form to open properly and let me add in rows.

I’ve tried:
ProcessCaller.LaunchForm()
Ice.UI.App.MemoEntry.MemoForm()
Ice.UI.App.MemoEntry.MemoArgs.StartNonModal()

How can I get it to come up and work?

While I’m sure it’s not completely the solution and while it might help to know what the error or result is when you try to open the Memo’s form, I did find that you might need to add your UD table to the Ice.MemoCatRelatedToTable table as the MemoEntry might be doing some validation that the table you are trying to add to is a table that is enabled for Memo’s.
Just a thought, let me know if that helps.

Thanks Rick_Bird, I’m not sure where in Epicor you can add a row to that table
So I tried it out with adding the record directly (dev database), which went in, but made no change.

Using:

Ice.UI.App.MemoEntry.MemoArgs.StartNonModal(UD10Form,“UD10”,“Ice”,Guid.Parse(edvUD10.dataView[0][“SysRowID”].ToString()),edvUD10.dataView[0][“Key1”].ToString(),“”,“”,“”,“”,“”);

The form opens but when you hit “New” it errors stating:
Access denied. Add is not allowed.

Using:

LaunchFormOptions lfo = new LaunchFormOptions();
lfo.IsModal = true;
Ice.UI.App.MemoEntry.MemoArgs ma = new Ice.UI.App.MemoEntry.MemoArgs(“UD10”,“Ice”,Guid.Parse(edvUD10.dataView[0][“SysRowID”].ToString()),edvUD10.dataView[0][“Key1”].ToString(),“”,“”,“”,“”,“”,true);
lfo.ValueIn = ma;
//lfo.ValueIn = edvUD10.dataView[0][“Key1”].ToString();
ProcessCaller.LaunchForm(oTrans,“Ice.UI.MemoEntry.dll”,lfo);

The process caller window opens, but the memo form does not.
I’m also unsure what to put in “ValueIn” if that is the method to use

I had similar issues with the CRM Call Log screen not launching, you may want to visit that thread as I had posted some code as to how I got it working. I dug up some old code for the Memo Editor that might at least lead you in the right direction:

Note: the Memo allows up to three key fields. The part that needs to be changed is the LaunchMemoEditor() section.
For example, if you wanted to use the first three Keys of UD01, you would have something like this:
protected override void LaunchMemoEditor()
{
EpiDataView edvUD01 = (EpiDataView) Transaction.EpiDataViews[“UD01”];
DataRow rowUD01 = edvUD01.dataView[edvUD01.Row].Row ;
this.LaunchMemoEditor(
rowUD01[“Key1”].ToString(),
rowUD01[“Key2”].ToString(),
rowUD01[“Key3”].ToString(),
“UD01 Key1:”,
“Key2:”,
“Key3:” );
}

Something I noticed when I tried adding the UD table to the Ice.memoCatRelatedToTable, is that if the
MemoCatRelatedToTable.SystemCode value was not set to ‘ERP’ my UD table would not show up in the Memo Category Maintenance program. An SQL Trace revealed that Epicor is checking for records where the SystemCode = ERP. So you might need that set as well for the create new to be successful.
That is probably not the only issue with what you are trying to do but since the Memo Category Maintenance program checks for this, is is likely that MemoEntry GetNew is as well.

I’m not sure how to run
protected override void LaunchMemoEditor()
It states “Script.LaunchMemoEditor(): no suitable method found to override”
Assuming that would link in to Ice.Lib.Framework.MemoHelper.LaunchMemoEditor - since the UD UI doesn’t have a class for it like I found others do

Though I did find on one of your (tomdomurat) previous posts for using a ProcessCaller.LaunchCallbackForm(oTrans,“Ice.UI.MemoEntry.dll”,memoArgs);
Which did open the form - but then I run into the “Can’t add rows” problem again.

I’ve tried changing the RelatedToSchemaName and SystemCode between ERP/ICE with no luck on adding the memo
Though with it on ERP I am able to go into the memo category entry and add in an entry for UD10

Additionally on directly adding in a memo row for UD10 - it has to go under RelatedToSchemaName = ‘Ice’ or it won’t show up.
Then when you try to update the row you get the error: “Record for update was not found by its SysRowID value”

This might just end up with me making my own “memo” screen out of a UD table but I’d like to avoid that.

1 Like

Hi … Just Ran into this problem now on my project.
Here’s my fix for it in SQL … BO methods / Memo Adapter worked after this on UD108 Table in my example.
INSERT INTO [Ice].[MemoCatRelatedToTable] ( [RelatedToSchemaName]
,[RelatedToTableName]
,[RelatedToTableDesc]
,[SystemCode]
,[Module]
,[Company]
,[SystemFlag]
)
VALUES
(‘Ice’,‘UD108’,‘UD108’,‘ERP’,’’,null,1)

UPDATE Ice.ZDataTable SET [Description] = 'MemoMethod:UD108 User Defined Table 108. Not used by Epicor ’ WHERE DataTableID = ‘UD108’

Please don’t use sql to make direct updates or inserts in your database
That is against the support agreement and can cause serious issues for your installation

1 Like