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

add new custom column/field (ProdTable.QtyStUp) to the JobRegistration Grid from the JmgRegistrationGridSetup

(0) ShareShare
ReportReport
Posted on by 46

Hello,

Task very straight fordward:

I need to show the Started Quantity (ProdTable.QtyStUp) in the JobGrid at the Job Registration form and be added/Removed from the Setup of Grids form (JmgRegistrationGridSetup)

Reason: due to our small stock(inventory) space we are not allow to store to much inventory. All that is produced is to be delivered. We set a production for 1 pc but we produce 2 pcs just in case 1 pc goes wrong. if the need 100 pcs, then we produce 120 (start qty/QtyStUp) and we end up RAF the planned/estimated qty 100. That make sure that the 20 raw materials get used in the Total Production Cost. But the inventory would be 100 pcs. 20 pcs addicition will be only physical scrap. So the worker needs to know how many should be produced and this is not in the standard AX from where I can see.

pastedimage1585730713097v1.png

What is the correct/best way to add new custom column.??

I have already created a Display method in the JmgJobTable to get the QtyStUp from the ProdTable. I thought I could maybe force a StringEdit to the JobGrid in the JobRegistrationForm but no success. This grid is generated by X  

/// 
/// Gets the started Quantity (ProdTable.QtyStUp) name of the production related to the current job.
/// 
/// 
/// The QtyStUp quantity of the job.
/// 
// BP Deviation Documented
public display ProdQtyStUp QtyStUp()
{
    return ProdTable::find(this.ModuleRefId).QtyStUp;
}

I've been looking the \Classes\JmgRegistrationForm.registerAllGridFields(FormGridControl _fgc) that maybe can give me some clue but I dont know excaly how it works

pastedimage1585732170234v3.png

I have the same question (0)
  • WillWU Profile Picture
    22,361 on at

    Hi CBNest,

    See the DOC:

    https://docs.microsoft.com/en-us/dynamicsax-2012/developer/walkthrough-creating-a-form-based-on-a-composite-query

    This link creates a form based on a query,is this what you need?

    Hope this helps.

  • Verified answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    The FieldName lookup is not dynamic, it comes from JmgFieldName enum.

    So you need to add new value to that enum, and add handling to the new value.

    You can use cross references (right click - Add-ins - Cross-references - Used by) in the enum values to see how they are handled in code.

    At least following places need to be adjusted by you:

    Classes\JmgRegistrationForm\registerAllGridFields

    Tables\JmgRegistrationSetup\createDefaultSetup

  • CBNestor Profile Picture
    46 on at

    Hi Nikolaos,

    I am grateful for your fast response.

    looks interesting I'll try to do that.

  • Suggested answer
    CBNestor Profile Picture
    46 on at

    Hi Nikolaos,

    Well that was actually pretty straight forward.

    1. add new element to JmgFieldName enum: NC_QtyStUp

    2. edit Method Classes\JmgRegistrationForm\registerAllGridFields with new case for NC_QtyStUp

    for (i = 1; i <= _fgc.controlCount(); i  )
        {
            currentControl = _fgc.controlNum(i);
            switch(currentControl.name())
            {
                /*
                    ->NestorC 01/04/2020
                */
                case formControlStr(JmgRegistration,NC_QtyStUp) :
                    this.registerGridField(JmgFieldName::NC_QtyStUp,currentControl);
                    break;
                /*
                    <-NestorC 01/04/2020
                */
                case formControlStr(JmgRegistration,jobMarked) :
                    this.registerGridField(JmgFieldName::Select,currentControl);
                    break;
     

    3. add the NC_QtyStUp as a Column in the Configure Registration form Terminal configuration (compile jobregistration and save and PLAY [:   )

    pastedimage1585741637594v1.png

    Thanks a lot for your kindly help!

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 646 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans