You need to sign in to do that
Don't have an account?

how to create a formula between saleforces objects ?
Hello,
I have a problem, I want create a formula between saleforces objects but I have an error message.
"Erreur : Le champ Questionnaires__r n'existe pas. Vérifiez l'orthographe"
IF(AND(Respect__c=Questionnaires__r.Respect__c,Respect__c= True),1,0)
My object "Questionnaires__c" is available, can you explain me ?
Thank in advance.
I have a problem, I want create a formula between saleforces objects but I have an error message.
"Erreur : Le champ Questionnaires__r n'existe pas. Vérifiez l'orthographe"
IF(AND(Respect__c=Questionnaires__r.Respect__c,Respect__c= True),1,0)
My object "Questionnaires__c" is available, can you explain me ?
Thank in advance.
select (select name from Questionnaires__r) from Opportunity // the children.
... and one questionnaire has only one parent opportunity:
select Opportunity__r.Name from Questionnaire // one parent
All Answers
You have 2 objects, one is Questionnaires__c and another one is Respect__c
You have a lookup relationship from Questionnaires to Respect__c
You want to put a formula field on Questionnaires__c based on a field that is on Respect__c object, with a field named Respect__c (same as the object, why not)
Your formula field will be created in the context of Questionnaires__c object in the setup menu. You have to reference Respect__r.Respect__c.
Respect__r is the relationship name to your Respect__c SObject. Respect__c in this formula is the targeted field on the Respect__c SObject
For custom objects, look for a pair of entries with the relationship suffix __r:
https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_relationships_parent_child.htm
If you want to identify Parent and Child Relationships, there is one technique when you want to see (almost) "all" the available API names in only one XML file.
Setup > quick search: API > click on Generate Entreprise WSDL > button: Generate and you get just one huge file in the browser with all the API names of your org.
Verify all the elements with "__r" of your Questionnaire object in the exported entreprise WSDL.
'Questionnaires__r' or something very close (but in this exported WSDL, the found names are always sure).
I want created a formula in opportunité object with the object questionnaire.
I check the wsdl, and the objects questionnaire is true.
<element name="Questionnaires__r" nillable="true" minOccurs="0" type="tns:QueryResult"/>
So why this formula IF(AND(Respect__c=Questionnaires__r.Respect__c,Respect__c= True),1,0)
doesnt work in opportunity obect ,
To anyone who will take the time to answer, thank you so much!.
select (select name from Questionnaires__r) from Opportunity
... should work but that is not your needed formula probably.
Depuis questionnaire :
Singular: select Opportunity__r.Name from Questionnaire
<element name="Opportunity__r" nillable="true" minOccurs="0" type="ens:Opportunity"/>
select (select name from Questionnaires__r) from Opportunity // the children.
... and one questionnaire has only one parent opportunity:
select Opportunity__r.Name from Questionnaire // one parent
Opportunity__r.Name from Questionnaire // one parent