web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

operand type are not compatible in RDP class

(0) ShareShare
ReportReport
Posted on by 1,536

hi expert, today i am facing strange problem regarding operand type are not compatible, i want to display worker sales responsible name on a sales agreement fullfilment report, for this i just add the field from salesagreementheaderdefault table to sales agreement followupTmp table ,and  make the basic relationship of newly added field (worker sales responsible )with hcmworker table, when referencing it on RDP

like

 agreementFollowUpTmp.WorkerSalesResponsible=HcmWorker::find(salesAgreementHeaderDefault.WorkerSalesResponsible).name();

then it gives me error like that

Operand types are not compatible with the operator.

plz guide me ,

Regards.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    munsif Profile Picture
    1,536 on at
    RE: operand type are not compatible in RDP class

    thanks quershi & Martin, my problem solved.

  • munsif Profile Picture
    1,536 on at
    RE: operand type are not compatible in RDP class

    dear i have tried it, but it gives me information regarding workersalesREsponsible in digits form(1542222), i want to get textual data (munsif)? so how it can?

  • Verified answer
    Community Member Profile Picture
    on at
    RE: operand type are not compatible in RDP class

    Please make sure "agreementFollowUpTmp.WorkerSalesResponsible" is extended from type "Name" not "RefRecId".

    agreementFollowUpTmp.WorkerSalesResponsible=HcmWorker::find(salesAgreementHeaderDefault.WorkerSalesResponsible).name();

    Then your code will work fine. At this stage I guess "agreementFollowUpTmp.WorkerSalesResponsible" is of type RefRecId(Int 64) and you cannot assign "Name" (string) in it.

  • Verified answer
    Martin Dráb Profile Picture
    236,192 Most Valuable Professional on at
    RE: operand type are not compatible in RDP class

    If you want the name, create a field with right data type. What's the problem?

  • Suggested answer
    Martin Dráb Profile Picture
    236,192 Most Valuable Professional on at
    RE: operand type are not compatible in RDP class

    In that case, replace your code with

    agreementFollowUpTmp.WorkerSalesResponsible = salesAgreementHeaderDefault.WorkerSalesResponsible;

  • munsif Profile Picture
    1,536 on at
    RE: operand type are not compatible in RDP class

    thanks Martin, so please guide me how to get name for salesworker responsible,

    Regards

  • Suggested answer
    Martin Dráb Profile Picture
    236,192 Most Valuable Professional on at
    RE: operand type are not compatible in RDP class

    Most likely WorkerSalesResponsible is a record ID of HcmWorker (which is Int64 for value) and you're trying to assign a name (string) into it, which is clearly not compatible.

  • munsif Profile Picture
    1,536 on at
    RE: operand type are not compatible in RDP class

    thanks for quick response, both have int64 type, both have extended from salesworkerresponsible EDT.

  • Community Member Profile Picture
    on at
    RE: operand type are not compatible in RDP class

    What is the datatype of "agreementFollowUpTmp.WorkerSalesResponsible" ? Also make sure "salesAgreementHeaderDefault.WorkerSalesResponsible" is type of RefRecId.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#1
Guy Terry Profile Picture

Guy Terry 2 Moderator

#1
Community Member Profile Picture

Community Member 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans