• Sovane
  • NEWBIE
  • 125 Points
  • Member since 2009

  • Chatter
    Feed
  • 5
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 12
    Replies

I have a s-control that I would like to convert into APEX/VF. The current s-control executes two queries  - one from both the Event Object, and the other from a Custom Object. I then create an array which I populate with the results of both queries, sort by a date field in the array, and then display to the users a single list of data, ordered by date ascending.

 

Reading through the docs, I can't see how to replicate that functionality. It seems like it should be some form of List but as far as I can see, they are all one dimension unless they arebased on a sObject. Can someone suggest where I should start in creating a array that I can populate with the results of the two queries?

 

Thanks 

I have been asked by sales to create a field on an Account that counts all the opportunities associated with that Account. They wish to use this in various reports, among other things.

 

For example, if an Account has 4 Opportunities in its Opportunities Related List, this field would have the number "4" in it. And "0" if there are none.

 

I have been told I can do this with a cross-object formula, but cannot find any help or existing entries here regarding it.

 

Has anyone tried this and/or have some idea on how to do this?

 

Thank you.

SF information says that it is possible to build Workflow around Account Teams or Case Teams. Why am I not finding this possible? Am I missing something?

 

I am trying to either build a Workflow on Account Teams or Case Teams. What I really want is a cross-object Workflow on a Case and Account Teams. I want certain Email Alerts to be sent when a Case is actioned to a member of an Account Team.

 

Is this possible?

In the filed Street it is possible to use a rule end so the address comes over to lines.
Does anybody know how to prevent this?
 
We use an API call to an older backend system and a rule end creates major problems, we want to prevent this on both sides.
 
If you know somehow, contact me. It is also possible to call.
 
George
I have a lookup field on Account whcih looks up a custom object.
 
I would like this field to be unique on the account record. Is there any way using validation that I can enforce this.
 
  • December 11, 2008
  • Like
  • 0

Hi,

 

 I want to display an error message when a duplicate account has been created.

 Once I shown the error message, still user wants to create new record it has to save.

 

 Any suggestions or thoughts on this?

I'm fairly new to apex development and trying to write my first trigger.  I would like to count the number of products that fit a certain criteria and enter that into an Opportunity field.  I have a formula field called Proprietary_Count on the OpportunityLineItem object that returns either a 1 or 0 if the attached Product meets a criteria (Product_Type = "Proprietary") and I'm trying to count those up and insert that in the Opportunity field also called Proprietary_Count.  I can get it to work on a single update, but I know the way I'm doing it won't work on a bulk update.  Any ideas would be much appreciated!

 

 

trigger countProprietaryProjectsTrigger on OpportunityLineItem (after insert) { If (trigger.isinsert) { List<Id> opptyIds = new List<Id>{}; integer prodProps = 0; for(OpportunityLineItem oli: Trigger.new){ String OpportunityId = (String)oli.OpportunityId; if(oli.Approval_Proprietary_Count__C==1){ opptyIds.add(OpportunityId); prodProps = prodProps + 1; } } Opportunity[] opptysToUpdate = [select id, name, Approval_Proprietary_Count__C from Opportunity where Id IN :opptyIds]; for(Opportunity o: opptysToUpdate){ if (o.Approval_Proprietary_Count__C == null) { o.Approval_Proprietary_Count__C = 0; } o.Approval_Proprietary_Count__C = o.Approval_Proprietary_Count__C + prodProps;//just as an example } //Perform the update in a batch for al records update opptysToUpdate; } }

 

 

 

 

Message Edited by ron_reed on 02-02-2009 12:25 PM

I have a s-control that I would like to convert into APEX/VF. The current s-control executes two queries  - one from both the Event Object, and the other from a Custom Object. I then create an array which I populate with the results of both queries, sort by a date field in the array, and then display to the users a single list of data, ordered by date ascending.

 

Reading through the docs, I can't see how to replicate that functionality. It seems like it should be some form of List but as far as I can see, they are all one dimension unless they arebased on a sObject. Can someone suggest where I should start in creating a array that I can populate with the results of the two queries?

 

Thanks 

I have been asked by sales to create a field on an Account that counts all the opportunities associated with that Account. They wish to use this in various reports, among other things.

 

For example, if an Account has 4 Opportunities in its Opportunities Related List, this field would have the number "4" in it. And "0" if there are none.

 

I have been told I can do this with a cross-object formula, but cannot find any help or existing entries here regarding it.

 

Has anyone tried this and/or have some idea on how to do this?

 

Thank you.

In the Help info on Setting up Account Teams there is reference to a code field called AccountTeamMember. However when I try to create a Workflow with this field it says that field AccountTeamMember does not exist.

 

Why is that?

SF information says that it is possible to build Workflow around Account Teams or Case Teams. Why am I not finding this possible? Am I missing something?

 

I am trying to either build a Workflow on Account Teams or Case Teams. What I really want is a cross-object Workflow on a Case and Account Teams. I want certain Email Alerts to be sent when a Case is actioned to a member of an Account Team.

 

Is this possible?

Hi all,

I stored some images and script files in Documents. I need to access them from S-control. Salesforce developer support suggests me to do a query. Does anyone know how? Can anyone give me an example? Thank you in advance.

William

  • January 16, 2009
  • Like
  • 0
Hey guys, new to salesforce and having difficulties wrapping my head around s-controls.

I have programmed in Apex and it's actually pretty sweet. Ran into a situation where I had to use S-Controls and it's been a nightmare.

Here's the situation:
I have an Account object which can have 1 or many Goals.
These goals can have one ore many tactics/strategies.

Upon creating a new Strategy for a goal, the resulting page after clicking on 'new strategy' will have the account field already filled in to have the account from which this goal is from (the grandparent to the strategy).

so it goes Account->Goals->Strategies.

I got some help and through creating a separate button (since the standard NEW button for the strategy related list didn't work) I now have an s-control which takes me to where the strategies page used to be, and now just have an alert pop-up with the name of the account.

That was just to make sure I could GET the Account name. Now that I know I can, what I really need to do with it is, add it to the Account field on the original strategy creation page. I did not create these custom objects or the page layouts but I do have a general understanding of salesforce.
As I understand it, s-controls are used to display html elements in your original objects page layout or it can be it's own page altogether. I need the former, the data returned from my s-control, put into an Account field for my original Strategies page layout.

I hope this was clear, if you guys need any extra information let me know and I'll get it for ya.

Thank's to all who help in advance!

btw here's the code in the s-control that brings up the grandparent Account name. It's very simple as the purpose was to just see if it could be done.

<script type="text/javascript">
var ActId = "{!Account_Plan_vod__c.Account_vod__c}";
alert(ActId);
</script>

Message Edited by astro on 01-13-2009 07:18 PM
  • January 14, 2009
  • Like
  • 0
In the filed Street it is possible to use a rule end so the address comes over to lines.
Does anybody know how to prevent this?
 
We use an API call to an older backend system and a rule end creates major problems, we want to prevent this on both sides.
 
If you know somehow, contact me. It is also possible to call.
 
George
I'm trying to use a Lead Custom Field in a formula, but for some reason the system is telling me the field doesn't exist. I double-checked the spelling of the field name, and it all seems correct. Do you I need to do something else in order to use the Lead Custom Field in a formula?
I have a lookup field on Account whcih looks up a custom object.
 
I would like this field to be unique on the account record. Is there any way using validation that I can enforce this.
 
  • December 11, 2008
  • Like
  • 0