• Deepesh
  • NEWBIE
  • 55 Points
  • Member since 2010

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 16
    Replies

Hi, I wish to create a field of type "Email" and to populate this field with the Email address of the object creator. As there is a formula option when creating a field to populate the default value I thought I could use this to populate the field.  I therefore tried the following in the in the formula box for my Email Field.

 

CreatedBy.Email

 

However I get an error "Error: Field CreatedBy does not exist. Check spelling" when I try this out.

 

As formula fields can't be of type email I thought it would be handy if I could instead use the formula box/option in my Email Field to populate this.

 

Do you know if this should be allowed? If not will I require a workflow rule to populate this (it seems unnecessary to be honest).

 

Thanks in Advance. 

Hi i'm new to salesforce can any one help me. Can  we write triggers on multiple objects if yes could you send me some sample code 

I wrote a trigger which compares old values and new values in it.  This trigger is sending http request to another system. Some values are updated to a new values by work flow rule. So, when we change some value trigger fires in sending the http request and work flow updates some fields. So, the trigger again fires after the work flow rules and sends the value through http request. but this times it is sending previous value and the values which are updated through work flow rule. So my question is, Is there any way to stop the sending previous value twice(first time trigger fires and the after workflow trigger fires again) or is there any way to fire a trigger just once after the workflow rules.

Hi, I wish to create a field of type "Email" and to populate this field with the Email address of the object creator. As there is a formula option when creating a field to populate the default value I thought I could use this to populate the field.  I therefore tried the following in the in the formula box for my Email Field.

 

CreatedBy.Email

 

However I get an error "Error: Field CreatedBy does not exist. Check spelling" when I try this out.

 

As formula fields can't be of type email I thought it would be handy if I could instead use the formula box/option in my Email Field to populate this.

 

Do you know if this should be allowed? If not will I require a workflow rule to populate this (it seems unnecessary to be honest).

 

Thanks in Advance. 

Hi,

 

How can i have coverage on get methods in a controller?

 

	public List<SelectOption> Listtype
	{
		get
		{
			List<SelectOption> Val = new List<SelectOption>();
                        Val.add(new SelectOption('First', 'One'));
                        Val.add(new SelectOption('second', 'two'));
                        Val.add(new SelectOption('Third', 'three'));
                        return Val;
			
			}
}

 Any pointers

Hi,

 

I want to expose some fields of an object over email with an embedded page/page layout where I want customer to give their feedback and save those data without logging in the main system.

If its possible can anybody explain please.

 

Regards

 

Prazon

  • March 02, 2012
  • Like
  • 0

Hi i'm new to salesforce can any one help me. Can  we write triggers on multiple objects if yes could you send me some sample code 

Hi all!  

 

So I'm wondering how to separate one of my divisions in Salesforce off completely into another database.  I currently use seperate record types, profiles, page layouts and the like, but I want a completely different database here.  This is because my company could potentially one day be selling one of our divisions.   

 

What is the best way to do this now so that I can get a head-start here?  Any ideas are appreciated.  

 

Oh, I have the Enterprise Edition also. 

 

Thanks a lot!!!

Hi,

 

I need to be able

 

  1. to limit the 'number' of attachments an object record can have
  2. to limit the 'types' of files (e.g.. pdf, jpeg etc...) that can be attached

Is this possible? If yes, could someone indicate how?

 

Thank you

 

cash123

Hi,

 

Does it work to approve via email from mobile?  We ran into the issue that it didn't seem to work. It sent the reply back to the approval process submitter.  Is there any setting needed?

 

Thanks for all the help.

  • March 01, 2012
  • Like
  • 0

I have a custom visual force page which lists records from an external system related to the sales force account. These records are retrieved via web service callout in the constructor of my custom controller apex class. Now, if the web service fails (e.g. timeout, network failure) I want to log this failure within sales force.

 

Idea 1: Log the error to the debug log with System.debug(). Problem: I have to ensure that debug logging is enabled for all my 100's of users. As far as I can see, nothing is logged if I don't do this. Even if I enable logging it's not very easy to work with and sales force limits the data size.

 

Idead 2: Create a custom object called SystemEvent and do an insert with some useful information such as the time, user and reason. Problem: the framework does not allow me to do an insert (System.LimitException: DML currently not allowed) when my page is called (either constructor or getSomethings methods). I could add an action but then I need a button and the user has to click "Load" to see any data.

 

So now I'm stuck between a rock and a hard place.

1) Is there a better way to log such events?

2) Why does force.com impose such a limit on me? Trust me guys. I can use the DMS responsibly - is there any way around this?

can we move user from one  org(sandbox) to another sandbox like we move profiles etc??

Hi,

 

I have an object 'Values' having the following fields:

 

Value Code(Name)[textbox]

Description(VSDesc__c)[textbox]

Parent(VSHead__c)[checkbox]

Parent Value(Parent_Value__c)[lookup with the filter, where VSHead__c = true]

Level(VSLevel__c)[numeric]

 

 

now, i simply want to maintain 3 Level hierarchy at the backend, i have written the following trigger: 

 

trigger SetValueLevels on Seg1__c (before insert)
{
FOR(Seg1__c val : trigger.new)
{
IF (val.Parent_Value__c == null && val.VSHead__c == true)
{val.VSLevel__c = 1;}
IF(val.Parent_Value__c !=null && val.Parent_Value__r.Parent_Value__c==null)
{val.VSLevel__c =2;}
ELSE
{val.VSLevel__c = 3;}
}
}

 

 It is working fine but the only issue is that it is not going for 3rd level.

 

Please help in this,  Hope everything is clear..

 

Thanks in Advance :)

  • March 01, 2012
  • Like
  • 0

Hi,

  Can any body help me on this. I want to delete the chatterposts automatically with keyword 'Created' or 'Updated'.  This should be a trigger  on chatter feed or anything else? 

 

I have tried on Chatter teed Trigger::: But this is not working . When i created any new record the Chatter post "The Owner has created the Record." chatter post is still there.

 

My code---

 

Trigger delete_Records_with_Created on FeedItem (after insert) {

Feeditem thisf;

for(FeedItem f:Trigger.new){

   thisf=f;

}

String body_text=thisf.body;

if(body_text.contains('created')==true)

delete thisf;

}