web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How to Edit Job Identification (jobId) lookUp field in the JmgCalcApprove Form AX2012R3

(0) ShareShare
ReportReport
Posted on by 46

Hi all,

I have a small -hope so- customization to make in the Calculate/approve form trans grid.

The JobId field/column has a lookup field that probably get filter depending on the JmgStampJournalTrans.JobRefype.

pastedimage1624343052119v1.png

I want to modify the LookUp field on the JobId to add two more columns (when jobRefType is of type Process:

1.The ProdRoute.OprId (shouldn't be that complicated)

2. the CostCategoryId ( which has a custom table references that links a subset of Shared CostCategoriesId with a specific OprId)

the Idea:  instead of selecting the Job Id, the costCategoryId. This because instead of stamp in a secuencial id (jobId) the worker have a predefined list of static codes (CostCategoriesId).

The issue: I don't know where to find the LoopUp method for the JobId :/ . where is that exactly built?

pastedimage1624343755088v2.pngpastedimage1624343804854v3.png

As always your Help is greatly appreciated 

thanks a lot beforehand.

I have the same question (0)
  • Verified answer
    ergun sahin Profile Picture
    8,826 Moderator on at

    pastedimage1624352661313v1.png

  • CBNestor Profile Picture
    46 on at

    Hi Ergün,

    thanks for reply. May I ask you Please show me how did you track it down

    appreciate that

  • Verified answer
    ergun sahin Profile Picture
    8,826 Moderator on at

    If you can't see lookup on the form, you have to look at the table first. Then to the relevant EDT. Two points on EDT are important.

    First one has table relation in old edts

    pastedimage1624354616177v1.png

    in cases where the EDT is linked with the table, you should look at the following values of the relevant table

    pastedimage1624356993379v2.png

    Secondly, you need to look at the following property on the EDT

    pastedimage1624357145015v3.png

    There are more complex lookups but in general this info will do

  • CBNestor Profile Picture
    46 on at

    Hi Ergün,

    Perfect! you are a genius! did not know they were so many kinds of lookups (: .

    I have been researching further and debugging the JmgJobIdLookUp form on how it gets auto filtered depending on the selected record (quite interesting by the way).

    So my Idea -not sure if the best- is actually modifying my costCategory lookup to also get filtered depending on the related ProdId (reference Column) and at the same time after the costCategory is selected by user, the JobIdentification (jobId lookup) will be automatically assigned (this last thing I am not sure how to do it).

    Here my first doubt: since my lookup comes from the table' AutoLoopup field group. Is it possible to create a method to filter that  AutolookUp?. Or I have to create separate form Lookup and then filter it using the dataSource.

    I want this lookup to work accross the system with low maintenance. Overriding methods on each form a don't think is a good idea.

    pastedimage1625034684817v1.png

    as always greatly appreciated

  • Verified answer
    ergun sahin Profile Picture
    8,826 Moderator on at

    You can create a custom lookup form and add it to EDT (like JmgJobIdLookup)

    stoneridgesoftware.com/.../

  • CBNestor Profile Picture
    46 on at

    so I think the answer is no :(.

    Since I almost guessed that. I started making the custom. There is something annoying that I don't get it.

    why The color rows are not shown?

    pastedimage1625049756685v1.pngpastedimage1625050173499v2.png

  • Suggested answer
    ergun sahin Profile Picture
    8,826 Moderator on at

    I did not fully understand. You are writing a custom lookup (not a form) and you want to show fields from more than one table(?).

    You can use SysMultiTableLoookup for this, but remember, it's not a standard class. I shared the link below

    kashperuk.blogspot.com/.../sysmultitableloookup-dynamic-lookups.html

  • CBNestor Profile Picture
    46 on at

    Hi Ergün,

    Thanks for replaying.

    I am trying to implement the same logic as per JmgJobLookup form. I managed to get callers' record from the Approval form and I managed to filter the custom lookup when process+prodid is selected. Now I have some issues.

    1. when I select any value from the lookup, it does not write anything to the line field of the grid, the lookup just closes and nothing happens. Do I have to override any method for that?

    2. about the Color rows, I mean that this lookup form's grid opens completely in white. there is no <blue/white/blue> background alternating row color on the grid.

  • Verified answer
    ergun sahin Profile Picture
    8,826 Moderator on at

    In fact, if you follow the link I shared exactly, you will reach the result more easily.
    However, I think you made a mistake on one of two points.

    stoneridgesoftware.com/.../

    public void init()
    {
        super();
     
        // Returns selected value from form control
        element.selectMode(Dinosaurs_DinosaurName);
    }

    Or

    public void lookup()
    {
        // Overrides a lookup method to utilize the default lookup form
        FormRun lookup;
        Args args = new Args(formStr(DefaultLookup));
        
        args.parm("");
        args.caller(this);
        lookup = classFactory.formRunClass(args);
        lookup.init();
        this.performFormLookup(lookup);
    }

    I don't quite understand the color issue. It will be clearer if you post a picture. However, its a lookup don't expect it to open like a form.

  • CBNestor Profile Picture
    46 on at

    Hi Ergün,

    you were right I was so focus on the JmgJobLookup that I did not catch that line element.selectMode(); thanks very much!

    now is selecting properly :). I am almost there to finish!

    1. I have override the Modified() method on my custom grid Field to write the related JobId from Code (this works but..). The problem is that is only working when is "modified". how can I do to change it every time the User inserts in the custom field the first time and/or modifies it?

    pastedimage1625477019166v1.png

    2. How can I do to  make the custom field to be Editable after is inserted to the table. I see that once is written on the table I cannot change it. but the rest of the fields are easily changeable, for example: the JobId.

    pastedimage1625477359534v2.png

    3. The alternate Row color did not Show because the Datasource AllowEdit/Create/Delete were Set to Yes. I change it to No and no it looks good (Fixed)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 592 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 478 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 305 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans