Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Error in PurchPurchaseOrderHeader/initFromCompanyInfoOnBlankPaper Method

(0) ShareShare
ReportReport
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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans