+ Start a Discussion

Is it possible to automatically update the mandatory object field with a new formula field?

If there is anyone that can help me with a simple formula that I don't seem to be able to get working I'll be a happy lady today:smileyhappy:
I have an object for Issues and when I created the object I get the obligatory mandatory field where the user needs to enter some data or I have it as a autonumber, in my case it is a text field called Issue ID.   I have then created another field which is a formula text field called Issue Number and what I want to happen is when someone types in the Issue Number I want to set workflow to go and update my Issue ID with the same number, I know this is possible I just keep messing this up.
Also is there anyway to sequential numbering on an object so when I enter an Issue Number 1 the next one created would become 2 etc.  If you use autonumber it doesn't do this?
Please help me before I loose my mind.
It is possible and I have managed to resolve this myself :>)
In your last sentence are you asking if the auto-number does this?  Yes it does.  Change the "Name" field of your object and label it: Issue ID and make it an auto-number.  Set the starting number to 0 and the format you want.  Now if you want to 'name' the object then create another field and call it Issue Title, or name.

Hi Fifedog, I don't think I explained very well and then I found my resolution whilst it worked was not in the end what I wanted, so heres the deal.

When you create a new object you automatically get given the mandatory field that it the link into the object, so I have created an object to handle Project Issues and my mandatory field is called Issue ID, I made this an auto number but it does not sequence them 1, 2 , 3. etc, so my manager has asked for a customer field that the user will fill in with a sequence number to identify the project issue, so now I have two field technically for the same thing! what I really want is to be able to automatically update the original mandatory field (the link into the object) to be the same as the user entered field.    Now if the mandatory field is text and not auto number it works fine I can get it to update, however if the field is auto number I cannot get the update to work, any ideas?   I am going spare trying to resolve this.  Or if you can give me any suggestions that would be great.

Kazjam - The auto number will give you a sequence so I'm unsure how you've set up that field but I think your mistaken... You're making this much more difficult then it is.  Here is a screencast of how to set you your autonumber correctly.

The change will only work for New records, it will NOT go back and re-number those already in the system.  If you want to have those numbered you'll have to export the data and reload them.  If that's not an option then figure out what the next project ID should be and make your starting number that.  So if you already have 14 projects then make the starting number 15.

Message Edited by fifedog on 01-20-2009 08:35 AM

Hi Fifedog, I am using the autonumber correctly but my situation is much more complicated that just sequencing numbers.  I have multiple project issues across multiple project entries, so Project is my main object and project issues is another entry, we have something like 500 or so projects entered and each project could have 1-xxx number of issues.  Each project issue has a Issue ID which is my mandatory required field I got from building the object which I made an autonumber using much the same autonumber you have given me, this does sequence numbers but across all projects not on an individual project, so if I have Project X and it has 10 issues each issue number will not be 1-10 it could be 1, 14, 50, 76 etc as other project issues against other projects may have used the next sequence number.  So what I want to do is make the user enter a proper sequence number that we have defined and then I want to auto update on the mandatory field I got when I created the object so that I can then drop it down into an area that they can't see this field but it matches what they are putting in manually and stills allows the link into that project issue - do you follow?


Ah... ok I now understand. The child object must be sequence for it's parent object, not across all child objects.  I have an idea but unsure if it would work.  The only way I can think of for sure is some type of APEX code, which then you need to visit the dev forum to ask.


Other than that my idea is something of the following: 

1) create a summary field on the Parent, Project, object to count the related Project Issues.  This would give you the 'sequence' number of the latest project issue.

2) Then have some type of formula field,ID number, on the child object to look at the Summary sequence field.

3) have a work flow with a field update on create to update the Project issue name with the ID number.


However this may become easier in the next release because I believe they're coming out with cross object workflow.  you may want to access one of the pre-releases and testing.