You need to sign in to do that
Don't have an account?
SSeb
Find product count availability from a custom object
Step 1 - Get ship date and return date from Opportunity -
select o.Name, o.First_Ship_Date__c, o.Expected_Return_Ship_Date__c
from Opportunity o where id in ( select OpportunityId FROM OpportunityLineItem )
Step 2- Get the min ( count of product ) between the ship date and return date from my custom object where I have the product on hand by date.
Select MIN(K_DS_WIFI_1__c) from Datascan_Product__c where Count_Date__c > 2019-04-01 and Count_Date__c < 2019-04-30
Step3 : Use a trigget to update a field with the value of the min ( count of product) on the Opportunity line item.
Questions
Is there a way to combine step 1 and step 2 in the same soql.
How to call the soql in the trigger?
select o.Name, o.First_Ship_Date__c, o.Expected_Return_Ship_Date__c
from Opportunity o where id in ( select OpportunityId FROM OpportunityLineItem )
Step 2- Get the min ( count of product ) between the ship date and return date from my custom object where I have the product on hand by date.
Select MIN(K_DS_WIFI_1__c) from Datascan_Product__c where Count_Date__c > 2019-04-01 and Count_Date__c < 2019-04-30
Step3 : Use a trigget to update a field with the value of the min ( count of product) on the Opportunity line item.
Questions
Is there a way to combine step 1 and step 2 in the same soql.
How to call the soql in the trigger?