Pls submit your topic here, i will review and do the same. docs.google.com/forms/d/18CTXYL6RJf6LnYsDQ_xv4thJhS-2rOdYxrjifU2EWfs/viewform?edit_requested=true
I have submitted it. The requirement is videos on advanced Groovy scenarios-based examples. You may start a series of Groovy scripting examples along with topics and then examples. It will be really helpful for us who would like to learn Groovy from scratch. You are the only guy on TH-cam whose content is great and detailed and informative.
@@arjunmahajan3622 Pls submit your specific topic here, i will review and do the same. docs.google.com/forms/d/18CTXYL6RJf6LnYsDQ_xv4thJhS-2rOdYxrjifU2EWfs/viewform?edit_requested=true
Hi Arjun, I can try making videos if you provide a specific scenario and if that is helpful for others as well. If you have doubts that are specific to you, send an email to sunil.kumar.poojari@outlook.com
Hi Sunil, I was trying validation. Below are requirement. -> Validation not allow users to Approve the Deal if the End Customer is not approved. Please advise how to approach and code with groovy.
This were approaches I follow Pls advise is this correct? // Approach 1 def endCustomer = nvl(CustomerName,'NO_CUSTOMER') if (endCustomer!= null) { if(nvl(Organization?.SalesProfileStatus,null)!= 'Approved' && isAttributeChanged('StatusCode') && StatusCode!= 'ORA_APPROVED') { throw new oracle.jbo.ValidationException('Validation to not allow users to Approve Opportunity Request if the End Customer is not approved.') } } // Approach 2 if(isAttributeChanged('CustomerId') && nvl(CustomerId,null) != null && isAttributeChanged('StatusCode') && StatusCode!='ORA_APPROVED'){ def endCustomer = nvl(CustomerName,'NO_CUSTOMER') def vo = newView('OrganizationProfile') def vc = vo.createViewCriteria() def vcr = vc.createRow() def vci1 = vcr.ensureCriteriaItem('PartyName') vci1.setOperator('=') vci1.setValue(endCustomer) vc.insertRow(vcr) vo.appendViewCriteria(vc) vo.executeQuery() while(vo.hasNext()){ def eachAccount = vo.next() def recordstatus = eachAccount.getAttribute(SalesProfileStatus) if(recordstatus !='Approved' || Organization?.Status_c != 'Approved'){ throw new oracle.jbo.ValidationException('Validation to not allow users to Approve Opportunity Request if the End Customer is not approved.') } } }
Hi Sunil, Thanks for content.
Hi Sunil, please create more videos on complex scenarios on Groovy sessions. You are doing a great job.
Pls submit your topic here, i will review and do the same.
docs.google.com/forms/d/18CTXYL6RJf6LnYsDQ_xv4thJhS-2rOdYxrjifU2EWfs/viewform?edit_requested=true
I have submitted it. The requirement is videos on advanced Groovy scenarios-based examples. You may start a series of Groovy scripting examples along with topics and then examples. It will be really helpful for us who would like to learn Groovy from scratch. You are the only guy on TH-cam whose content is great and detailed and informative.
@@arjunmahajan3622 Pls submit your specific topic here, i will review and do the same.
docs.google.com/forms/d/18CTXYL6RJf6LnYsDQ_xv4thJhS-2rOdYxrjifU2EWfs/viewform?edit_requested=true
Hi Sunil, please upload some more videos on Groovy sessions
Hi Arjun,
I can try making videos if you provide a specific scenario and if that is helpful for others as well. If you have doubts that are specific to you, send an email to sunil.kumar.poojari@outlook.com
Hello Sunil, please advise on below query.
def optyTeam = nvl(Opportunity_Src_OpportunityToOpportunityCM_c_Src?.OpportunityResource,null)
Is this custom relationship Opportunity_Src_OpportunityToOpportunityCM_c_Src?
Yes
Hi Sunil, I was trying validation. Below are requirement.
-> Validation not allow users to Approve the Deal if the End Customer is not approved. Please advise how to approach and code with groovy.
This were approaches I follow Pls advise is this correct?
// Approach 1
def endCustomer = nvl(CustomerName,'NO_CUSTOMER')
if (endCustomer!= null)
{
if(nvl(Organization?.SalesProfileStatus,null)!= 'Approved' && isAttributeChanged('StatusCode') && StatusCode!= 'ORA_APPROVED')
{
throw new oracle.jbo.ValidationException('Validation to not allow users to Approve Opportunity Request if the End Customer is not approved.')
}
}
// Approach 2
if(isAttributeChanged('CustomerId') && nvl(CustomerId,null) != null && isAttributeChanged('StatusCode') && StatusCode!='ORA_APPROVED'){
def endCustomer = nvl(CustomerName,'NO_CUSTOMER')
def vo = newView('OrganizationProfile')
def vc = vo.createViewCriteria()
def vcr = vc.createRow()
def vci1 = vcr.ensureCriteriaItem('PartyName')
vci1.setOperator('=')
vci1.setValue(endCustomer)
vc.insertRow(vcr)
vo.appendViewCriteria(vc)
vo.executeQuery()
while(vo.hasNext()){
def eachAccount = vo.next()
def recordstatus = eachAccount.getAttribute(SalesProfileStatus)
if(recordstatus !='Approved' || Organization?.Status_c != 'Approved'){
throw new oracle.jbo.ValidationException('Validation to not allow users to Approve Opportunity Request if the End Customer is not approved.')
}
}
}
@@arjunmahajan3622 Approch 1 will be simple and recomended.
@@OracleCloudSunilKumarVlogs thanks Sunil so approach 1 correct ?