function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Trigger - i want reserve items

Hi im newbiee


I have problem i write : 


trigger createReservation on Rezerwacja__c (before insert, before update) {

Set<id> rezSet = new Set<id>();

for (Rezerwacja__c rez :{

List<Rezerwacja__c> rezList = [SELECT Rental_Date__c, Date_of_return__c, Status__c
FROM Rezerwacja__c
where id in];
List <Item__c> itList = [SELECT id, name FROM Item__c WHERE Item__c.Rezerwacja__c IN : rezList];

Map<Id, List<Rezerwacja__c>> rezMap = new Map<Id, List<Rezerwacja__c>>()




i wants the item was not available in a given period of time

Can somebody help me ?? 


Do you mind ,if you could explain me your requirment in detail . Then ,I can have a look ... !! 

The variables in the trigger only lives during the insert or the update. If you want to read that Set later, you need to save it in another static class.