HELLO All,
KINDLY PLEASE REPLAY ME,
How to Restrict if the main record contains the related records, if main record contains one record, then related record also one record must exist, if main record exists two records, then related record also must contain two records.
I have added Workflow, If the above validation will work then only, we can be able to do submit otherwise It wants to show error ( Please Fill details like)
I wrote below code, it is validating only first record, not validating for second record.
//while select KTTypeLines
// where KTTypeLines.Dependent == KTDetails.Dependent
// && KTTypeLines.DependentRecId == KTDetails.DependentRecId
// && KTTypeLines.HeaderClaimRefID == KTDetails.HeaderClaimRefID
// && KTTypeLines.EmployeeNumber == KTDetails.EmployeeNumber
//{
// select KTDetails
// where KTDetails.HeaderClaimRefID == ltClaimHeader.ClaimReferenceID
// && KTDetails.EmployeeNumber == ltClaimHeader.EmployeeNumber;
// if(KTDetails.RecId == KTTypeLines.RecId )
// {
// data.submit(args);
// }
// else
// {
// throw error("KT details and KT lines are required");
// }
//}
Hello,
Please avoid creating duplicated threads.
Hi Krishna4248,
It seems that you aren't using D365 Customer Service. Could you tell us which app are you using?
HELLO All,
PLEASE REPLAY ME,
How to Restrict check if the main record contains the related records, if main record contains one record, then related record also one record must exist, if main record exists two records, then related record also must contain two records.
I have added Workflow, If the above validation will work then only, we can be able to do submit otherwise It wants to show error ( Please Fill details like)
I wrote code below code, it is validating only first record, not validating for second record.
//while select KTTypeLines
// where KTTypeLines.Dependent == KTDetails.Dependent
// && KTTypeLines.DependentRecId == KTDetails.DependentRecId
// && KTTypeLines.HeaderClaimRefID == KTDetails.HeaderClaimRefID
// && KTTypeLines.EmployeeNumber == KTDetails.EmployeeNumber
//{
// select KTDetails
// where KTDetails.HeaderClaimRefID == ltClaimHeader.ClaimReferenceID
// && KTDetails.EmployeeNumber == ltClaimHeader.EmployeeNumber;
// if(KTDetails.RecId == KTTypeLines.RecId )
// {
// data.submit(args);
// }
// else
// {
// throw error("KT details and KT lines are required");
// }
//}
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,818 Super User 2024 Season 2
Martin Dráb 229,147 Most Valuable Professional
nmaenpaa 101,156