cancel
Showing results for 
Search instead for 
Did you mean: 

Using UDO as two different Documents

Former Member
0 Kudos

HI All,

I m using a UDO "UDO_QC" with form "frmQC"

i m using the same form for 2 different criterias of GRPO and Production

I have made the form but the problem is the DocNum are shown in both the form of GRPO and Production

Pls tell me if i can achieve this using a single form and single UDO, so that when i move through the document of GRPO, i should be able to see only GRPO documents and when i move through the document of Production, i should be able to see only Production documents

Regards

Suresh G

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Suresh,

GRPO and Goods Receipt share the same table. If you want to use a single form and single UDO, you need to give a filter to find different document types.

Thanks,

Gordon

Former Member
0 Kudos

Thanks Gordun,

Could u Pls give me the sample code showing the way to use Document Type for Bifurcation of Documents

Regards

Suresh G

Former Member
0 Kudos

Hi Suresh,

What I did in the past I showed the data in a tabular form and filtered based on a specific condition.

Below is a code sample (some of the classes and properies used are wrappers to the one provided in the DI, but still can give you an idea of the logic).


            this.Freeze(true);

            try
            {
                var elementsMatrix = this.ControlManager.Matrix("mtx_0");

                if (elementsMatrix != null)
                {
                    var messagesDataTable = this.DataSource.UserTable("MessagesDT");
                    messagesDataTable.Rows.Clear();

                    messagesDataTable.ExecuteQuery(
                        !((CheckBox) this.ControlManager.Item("chkShowAll").Item.Specific).Checked
                            ? "exec dbo.oz_GetMessageQueue 0"
                            : "exec dbo.oz_GetMessageQueue 1");

                    elementsMatrix.BaseObject.LoadFromDataSource();
                }
            }
            catch (Exception ex)
            {
                ErrorHandlerHelper.HandleException(ex);
            }
            finally
            {
                this.Freeze(false);
            }

I hope this helps