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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Error in inserting the Applicant through ALF

(0) ShareShare
ReportReport
Posted on by 505

Hai All

 

Currently i am doing job portal integration with AX for that i need to import the Applicant into ax through the Document service from C# and i getting the following error

 

Document  could not be created. Error details: Error found when validating record.

 

Coding

 

            JPApplicant.ApplicantServiceClient client = new ApplicantServiceClient();
            JPApplicant.CallContext context = new JPApplicant.CallContext();
            context.Company = "usmf"; //Company Name      
            AxdEntity_HcmApplicant HcmApplicant = new AxdEntity_HcmApplicant();
            AxdApplicant applicant = new AxdApplicant();


            JPApplicant.AxdEntity_DirPerson_DirPerson party = new JPApplicant.AxdEntity_DirPerson_DirPerson();
            party.NameAlias = "ALFTesting";
            party.Gender = JPApplicant.AxdEnum_Gender.Male;
            party.MaritalStatus = JPApplicant.AxdEnum_DirPersonMaritalStatus.Married;

            JPApplicant.AxdEntity_DirPersonName personName = new JPApplicant.AxdEntity_DirPersonName();
            personName.FirstName = "ALF";
            personName.MiddleName = "Testing ";
            personName.LastName = "JP";
            party.DirPersonName = new JPApplicant.AxdEntity_DirPersonName[1] { personName };
            HcmApplicant.DirPerson = new JPApplicant.AxdEntity_DirPerson_DirPerson[1]{party};
            applicant.HcmApplicant= new AxdEntity_HcmApplicant[1] { HcmApplicant };

            try
            {
               
                client.create(context, applicant);
                Console.WriteLine("Success");
                Console.ReadLine();
            }
            catch
            {
                throw;
            }

Query

31_2D00_01_2D00_2015-04_2D00_58_2D00_10.png

in AX

Please Help me to Solve this Issue.. i tried all the possible ways

 

*This post is locked for comments

  • Suggested answer
    Martin Dráb Profile Picture
    241,656 Most Valuable Professional on at

    It means that a validation before saving the record failed, but it's difficult to say which one without collecting more information. Simply debug the service.

  • Verified answer
    Ramesh Dhamotheraswamy Profile Picture
    505 on at

    Hi Martin,

                      i solved the issue i missed the two fields Applicant id and dirparty.name after giving that two fields it gets inserted. thanks for the reply

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
nmaenpaa Profile Picture

nmaenpaa 2 Moderator

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans