Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Error in PurchPurchaseOrderHeader/initFromCompanyInfoOnBlankPaper Method

Posted on by 1,737

I am Writing The Below Code in the PurchPurchaseOrderHeader/initFromCompanyInfoOnBlankPaper 

this.TIN = "27650519753V";
this.SalesTaxRegistrationNumber = "27650519753C";
this.ECCNumber ="AABCS5068AXM002";

I am Getting This Error.

"Operand types are not compatible with the operator."

How To Solve this.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error in PurchPurchaseOrderHeader/initFromCompanyInfoOnBlankPaper Method

    I don't think you are supposed to assign a string value to an integer field. Somebody created the field with the intention that only number are entered. If you really have to insert a string you have to change the data type of the field but I would advise you not to do so because you would have to adjust all pieces of code that reference the field.

  • srinivas pamidi Profile Picture
    srinivas pamidi 1,737 on at
    RE: Error in PurchPurchaseOrderHeader/initFromCompanyInfoOnBlankPaper Method

    It is a Integer Field Now i assign the String Field.

    Is There is Any Alternative to assign these String Values,

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error in PurchPurchaseOrderHeader/initFromCompanyInfoOnBlankPaper Method

    The data type of the field where you get the error is not a string, so you can't assign a string value to it. Check what data type it is and assign a appropriate value.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 229,918 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans