interview notes

<template>
<template if:true={sendData}>
<c-child-component message='more than 100'/>
</template>
</template>

class parentComp extends lightningelement{
parentId='xxxxxxx';
parent;
sendData = false;
connectedCallback(){
getParentRecord(data,error){
parent = data;
if(parent.value>100){
sendData=true;
}
}
}

}


trigger oppTrigger on Opportunity(after Insert, after update){
List<opportunityLineItem> oplList = [select id,status,opportunityId from opportunitylineitem where opportunityId in : trigger.new];
List<opportunityLineItem> oplListUpdate = new List<opportunityLineItem>();
for(opportunityLineItem opl: oplList ){
if(trigger.newmap.get(opl.opportunityId).amount>=50000){
opl.status=won;
oplListUpdate.add(opl);
}
}
if(oplListUpdate.size()>0){
update oplListUpdate;
}

}

Best regards
Rajendar
+91 9177719594
Certified Salesforce Platform Developer I

No comments:

Powered by Blogger.