You need to sign in to do that
Don't have an account?
Pavan Kumar Desabhatla 8
send email from trigger data missing
My question, I have the following objects that I’m trying to query on and get the results.
Request__c ,Request_item__c have a master detail relation and Catalog_item__c has a look up to the Request_item__c.
The query below would run just fine if I pass a request ID value in developer console.
I have a VF page that would render the output with an id again.
However when placed this in a class constructor and give it the ID from trigger.new it would fail to retrieve any rows.
Any help in this regard is appreciated.
select Name,Request__r.Name,
Request__r.Contact__c,
Request__r.Lead__c,
Catalog_item__r.Name,
Request__r.Request_Details_rtf__c,
quantity__c,
Catalog_item__r.cost_center__c,
Catalog_item__r.sizeoptions__c,
request__r.Send_to_Company__c,
request__r.Send_to_Contact__c,
request__r.Request_Shipping_Street__c,
request__r.Request_Shipping_City__c,
request__r.Request_Shipping_State__c,
request__r.Request_Shipping_Postal_Code__c,
request__r.Request_Shipping_Country__c,
request__r.Phone__c
from request_item__c where Request__r.Id=:reqId1
Request__c ,Request_item__c have a master detail relation and Catalog_item__c has a look up to the Request_item__c.
The query below would run just fine if I pass a request ID value in developer console.
I have a VF page that would render the output with an id again.
However when placed this in a class constructor and give it the ID from trigger.new it would fail to retrieve any rows.
Any help in this regard is appreciated.
select Name,Request__r.Name,
Request__r.Contact__c,
Request__r.Lead__c,
Catalog_item__r.Name,
Request__r.Request_Details_rtf__c,
quantity__c,
Catalog_item__r.cost_center__c,
Catalog_item__r.sizeoptions__c,
request__r.Send_to_Company__c,
request__r.Send_to_Contact__c,
request__r.Request_Shipping_Street__c,
request__r.Request_Shipping_City__c,
request__r.Request_Shipping_State__c,
request__r.Request_Shipping_Postal_Code__c,
request__r.Request_Shipping_Country__c,
request__r.Phone__c
from request_item__c where Request__r.Id=:reqId1
if you are getting from trigger.new on before insert, the id is null because the record is not commited.
Good Luck.
Regards
Pavan
can you put all the class code that you are using + trigger.
Regards