Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Answered

how CustQuotationJour is linked with SalesQuotationTable? in AX 2012 r3

Posted on by 5,885

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,885 on at
    RE: how CustQuotationJour is linked with SalesQuotationTable? in AX 2012 r3

    thanks Sergei,

  • Verified answer
    Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,083 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,885 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,083 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,885 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,083 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,885 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,616 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,885 on at
    RE: how CustQuotationJour is linked with SalesQuotationTable? in AX 2012 r3

    why prerunmodifycontract ??

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

    You should write your code in prerunmodifycontract and not in prepromptmodifycontract

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,773 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,513 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans