Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Answered

how CustQuotationJour is linked with SalesQuotationTable? in AX 2012 r3

Posted on by 5,901

Hi all,

can you please let me know how CustQuotationJour is linked with SalesQuotationTable? I have not get proper matching in the QuotationID field in both tables.

Kindly let me know the exact relation between both tables,

Please give me more shed on this.

Thnaks!

  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: how CustQuotationJour is linked with SalesQuotationTable? in AX 2012 r3

    thanks Sergei,

  • Verified answer
    Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,089 on at
    RE: how CustQuotationJour is linked with SalesQuotationTable? in AX 2012 r3

    Hi @rp@n,

    It looks correct for me (but I don't see the implementation of findbyQuotationId in my version).

    Another way to get QuotationId is

    origQuotationId = custQuotationJour.salesQuotationTable().QuotationId;

  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: how CustQuotationJour is linked with SalesQuotationTable? in AX 2012 r3

    yes Sergei,

    i have received and i do the below code to ger original Quotation id to pass in dialog

    public void prePromptModifyContract()

    {

       GDJ_JPN_SalesQuotationContract    contract;

       // Set contract based on caller

       contract = this.parmReportContract().parmRdpContract() as GDJ_JPN_SalesQuotationContract;

        custQuotationJour   = this.parmArgs().record() as CustQuotationJour;

       origQuotationId = CustQuotationSalesLink::findbyQuotationId(custQuotationJour.QuotationId,

                                                                   custQuotationJour.SalesId,

                                                                   custQuotationJour.QuotationDate).origQuotationId;

        contract.parmQuotationId(origQuotationId);

       contract.parmCustAccount(custAccount);

    }

    is it rite?

  • Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,089 on at
    RE: how CustQuotationJour is linked with SalesQuotationTable? in AX 2012 r3

    Hi @rp@n,

    Have you check what record do you receive in this.parmArgs().record() in prePromptModifyContract? Is it CustQuotationJour or it's empty?

  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: how CustQuotationJour is linked with SalesQuotationTable? in AX 2012 r3

    Hi Sergei,

    can you please let me know how i will get default value in dialog? because in CustQuotationJour -- QuotataionId is different. i mean Quotation id = QT-0000002   it's not there.

    6012.Q1.jpg

    8004.Q2.jpg

    q5.jpg

    please give me more shed on this

  • Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,089 on at
    RE: how CustQuotationJour is linked with SalesQuotationTable? in AX 2012 r3

    Hi @rp@n,

    As Martin mentioned, most likely in this.parmArgs().record() you have custQuotationJour, but not CustQuotationSalesLink. And in this case you can use method custQuotationJour.salesQuotationTable to get related salesQuotationTable.

  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: how CustQuotationJour is linked with SalesQuotationTable? in AX 2012 r3

    yes, thats why i am telling you. for mine is same. Anyway i put it false dialog. So, thats why i used prePrompt

  • udaY-ch Profile Picture
    udaY-ch 4,624 on at
    RE: how CustQuotationJour is linked with SalesQuotationTable? in AX 2012 r3

    Preprompt is used to set the value before opening the dialog of the report and prerun is used to set the values before processing report logic.

    Check some standard report for references.

  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: how CustQuotationJour is linked with SalesQuotationTable? in AX 2012 r3

    why prerunmodifycontract ??

  • udaY-ch Profile Picture
    udaY-ch 4,624 on at
    RE: how CustQuotationJour is linked with SalesQuotationTable? in AX 2012 r3

    You should write your code in prerunmodifycontract and not in prepromptmodifycontract

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans