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
ZIKRA LOBANI 6ZIKRA LOBANI 6 

create formula field

Hi, 
I need help to create formula field on custom object which should be reffernce to Autonuber field on another custom object .
new object : order
field name : request number 
object : Internal request 
field autonumber : IN number 
I have used this formula(text) :
request number =Internal_request__c.IN_Number__c
and the result was syntax error ??!
pradeep kumar yadavpradeep kumar yadav
First thing we can only use Objects in formula fields which are in relationship.
Means, there sould be lookup or master detail field available on object 'order' to object 'Internal request'.
ZIKRA LOBANI 6ZIKRA LOBANI 6
Thank you Pradeep , I have created master detail field between two objects .
but still there's syntax Error: Field Internal_Request_J__c does not exist ??!
How to solve this .
pradeep kumar yadavpradeep kumar yadav
First of All in formula fields, there is a button 'Insert Fields' . By navigationg with this button you can add any field related to that object.
Second for autoNumber fields the return type is of formula is 'Text'.
Third to get value of autoNumber in number field you have  write "Value(Internal_request__c.IN_Number__c)" in formula.

If you add fields using Insert field navigation then you will not get any error.
pradeep kumar yadavpradeep kumar yadav
I have tested it works
ZIKRA LOBANI 6ZIKRA LOBANI 6
Hi Pradeep,
I created the formula as you mentioned "()" , but the formula appears on the field ?
Thank you .
User-added image
pradeep kumar yadavpradeep kumar yadav
Formula return type is Number, not Text and write this formula without quotes.
pradeep kumar yadavpradeep kumar yadav
Value(Internal_request__r.IN_Number__c)
ZIKRA LOBANI 6ZIKRA LOBANI 6
doesn't work , still there's syntax error .
appreciate your cooperation .
pradeep kumar yadavpradeep kumar yadav
Ok, but it looks like some other problem is connected with your error and you can't see it, 
For confirmation can you test the same senario with Standard Objects, by creating autonumber on account and used it in Contact, then you will understand the problem.