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 :
Finance | Project Operations, Human Resources, ...
Answered

In X++ Worker Recid Contract class

(0) ShareShare
ReportReport
Posted on by 1,215

Hi guys,

In my Contract class i wrote a Worker Recid and In UI Contract parameter Empty showing below my code.

[DataContractAttribute]
public class MPEmployeeBasicInfoMContract
{
    HcmWorkerRecId      workerRecId;

    /// 
    ///    Initializes data contract values.
    /// 
    public void initialize()
    {

    }

    [
    DataMemberAttribute('workerRecId'),
    SysOperationGroupMemberAttribute('workerRecId'),
    SysOperationDisplayOrderAttribute("1")


    ]
    Public HcmWorkerRecId  parmWorkerRecId(HcmWorkerRecId _workerRecId = workerRecId)
    {
        workerRecId = _workerRecId;

        return workerRecId;
    }

    public boolean validate()
    {
        boolean isValid = true;

        // Force date to be included in the restrictions. Without a date
        // range the resulting SQL query will need to do a cartesian product
        // against CustInvoiceJour, CustInvoiceTrans and CustTrans before
        // restricting down. Even with a relatively small database this
        // will result in filling up tempdb and crashing the report as well
        // as degrading all other queries against the SQL server. With date
        // range included, the date indexes on CustInvoiceJour will be used
        // to generate index seeks and allow a reasonable query.
        //if (!refRecid)
        //{
        //isValid = checkFailed("Recid is required");
        //}
//
        return isValid;
    }

    public static MPEmployeeBasicInfoContract construct()
    {
        return new MPEmployeeBasicInfoContract();
    }

}

My output below.

0083.Contract.PNG

what can be issue ? please let me know.

Thanks 

I have the same question (0)
  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Riyas,

    Is it a contract for job or for SSRS report?

  • Riyas ahamed F Profile Picture
    1,215 on at

    Thanks for your replay  Sergei sir,

    is it Contract class in SSRS report.

  • Verified answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Riyas,

    Do you see your parameter in parameter on SSRS report side? If not, please, restore data set.

    pastedimage1601877292584v1.png

  • Blue Wang Profile Picture
    on at

    Hi Riyas,

    In your DP class , did you add SrsReportParameterAttribute(), pointing to your contract class?

  • Riyas ahamed F Profile Picture
    1,215 on at

    Thanks for your answer Sergei sir.

  • Ranjeet_Kr Profile Picture
    on at

    Hi,

    You may also have a look at the below article which explains about the contract classes and parameters.

    docs.microsoft.com/.../how-to-group-and-order-report-parameters-by-using-a-data-contract-class

    We have seen sometimes the newly added parameters doesn't reflect at dataset level and that needs refresh/restore, which helps in pulling the new changes.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 467 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 420 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 241 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans