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 :
Microsoft Dynamics AX (Archived)

Create quotation line X++

(0) ShareShare
ReportReport
Posted on by 334

Hi, All:

I have a customization in sales quotation line form (salesQuotationTable)

To popup a new form to choose some items with some condition and then try to insert into quotation line.

I try to use  AxSalesQuotationTable , AxSalesQuotationLine class to do it.

However, Since the quotation header is already created.

and AxSalesQuotationTable  seems cannot initialize from an existing salesQuatation table .

The code is like this:

AxSalesQuotationTable = new AxSalesQuotationTable();
AxSalesQuotationTable .parmQuotationId(CurrentQuotationID);
AxSalesQuotationTable .parmCurrencyCode('USD');
AxSalesQuotationTable .save();

It is predictable it show the id is already existed error.

My question is 

1. In this scenario, Can I still use this class to do it?

2. If not, I have try to insert SalesQuotationLine , but the line I inserted did not show up in SalesQuotationLine form after inserted. It seems lacking some table relations or fields?

Thanks for the help! (I'm using AX 2012 CU 12)

Quatrani

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Chaitanya Golla Profile Picture
    17,225 on at

    Hi,

    I am a bit confused with your first question, as you said header is already created and I couldn't find the need to call AXBC class.Probably you might be using it to pass to salesQuotationLine, I feel it's not required. Please check you are passing values for fields QuotationId, LineNum and InventTransId on SalesQuotationLine. If possible, can you share your line creation code with us, such that we can check it once.

  • JCHI Profile Picture
    334 on at

    Hi, Thanks for the quick reply.

    You are right , the reason I new AxSalesQuotationTable is to pass to AxSalesQuotationLine.

    the code is like this.

    AxSalesQuotationLine = new AxSalesQuotationLine();
    AxSalesQuotationLine.axSalesQuotationTable(axQuotationTable);

    AxSalesQuotationLine.parmItemId(localTarns.itemNo);
    AxSalesQuotationLine.parmInventDimId('000072');
    AxSalesQuotationLine.parmcurrencyCode('USD');
    AxSalesQuotationLine.save();

    so you mean I don't have to do this?

    AxSalesQuotationLine.axSalesQuotationTable(axQuotationTable);

     

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans