Hello,
I have created new document service for Applicants. When we import the applicant using C# exception is occurred : "ApplicantId is Missing ". and when we insert applicantId through C#, record is created succefully.
But i want to generate this ApplicantId automatically (using Number sequence).
How is it possible.
Please help me
Thanks
Darshana
First of all, set the field as non-mandatory. If you don’t want to do it at table-level (which you usually don’t want), modify your document class: override initMandatoryFieldExemptionList() and call this.setParmMethodAsNotMandatory() inside. You’ll find several examples in the standard AX application, if needed.
Then add code to set the value from number sequence. For example, see how AxdHcmJobApplication.prepareForSaveExtended() assigns HRMApplicationBasket.hrmApplicationId.
Thanks for your reply…
I added number sequence code like AxdHcmjobApplication.prepareForSaveExtended(). But no not Generated…
Please help me…
Because services run in CIL, don’t forget to generate CIL from your X++ code. Then use the usual approach to code that doesn’t work - debug it.