• Arrow
  • NEWBIE
  • 25 Points
  • Member since 2007

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 17
    Replies

New to triggers and trying to find a code example to do the following:

 

Child opportunities linked to parent opportunites on Parent_Opportunity__c lookup

 

If parent CloseDate or StageName changes, I would like a trigger to update all child opportuntiies

  • November 05, 2013
  • Like
  • 0

I would like a button on opportunities which can be clicked to update child opportunities

 

I have tried to adapt code I found on this forum but the below code updates the parent rather than the children. I don't have much javascript knowledge.

 

Child opportunities linked to parent opportunities via Parent_Opportunity__c lookup. Child Relationship Name is Child_Opportunities.

 

 

{!REQUIRESCRIPT("/soap/ajax/23.0/connection.js")}

try
{
var strQuery="Select Id from Opportunity where Parent_Opportunity__c = '" +'{!Opportunity.Id}'+"'";

var newRecords = [];

var otherP = sforce.connection.query(strQuery);
var records = otherP.getArray("records");
for(var i=0; i < records.length ; i ++)
{
	var ob = new sforce.SObject("opportunity");
        ob.Id = records[i].Id;
	newRecords.push(ob);
}
var thisOb = new sforce.SObject("opportunity");
thisOb.Id = "{!Opportunity.Id}";
thisOb.StageName= "{!Opportunity.StageName}";
thisOb.Status__c= "{!Opportunity.Status__c}";

var result = sforce.connection.update([thisOb]);
result = sforce.connection.update(newRecords);

alert(result);
location.reload(true);

}catch(er)
{
	alert(er);
}

 

  • October 31, 2013
  • Like
  • 0

I'd like to put some text alongside a dashboard refresh button, perhaps alongside id: db_refresh_time

 

Something like "Click refresh to update dashboard"

 

I have experimented with a VisualForce dashboard component but can't get this to work.

 

Any ideas?

  • March 13, 2012
  • Like
  • 0

I am trying to create a hyperlink on a Visualforce Account page which will open an opportunity report.

 

Both the below variations run the report with an 18 character account id when the report requires a 15 character Account Id

 

<a href="/00OS0000000wS5N?pv0={!Account.Id}">Open Opportunities</a>

 

<apex:outputLink value="/00OS0000000wS5N?pv0={!account.id}">Open Opportunities</apex:outputLink>

 I'd appreciate advice as to what I am doing wrong.

  • February 03, 2012
  • Like
  • 0

Newbie to Visual Force

 

Currently I have 3 Account record types:

 

Master

Standard

 

Account Group

 

The first two use a standard account page

 

The last one uses a standard page Account Group.

 

I would like to build a Visual Force page for when users are viewing an Account Group record type.

 

Is this possible and how would I achieve this?

 

I would prefer to continue using a non Visual Force page for normal Accounts as this is much easier to maintain using drag and drop.

 

My Account Group layout only has a few fields and related lists so will be easy to maintain as a Visual Force page. My reason for wanting to use Visual Force for the Account Group is to be able to have different labels for some of the fields, to get rid of the view hierarchy link etc. etc.

  • January 19, 2012
  • Like
  • 0

We have KPIs on the opportunity dependent on Stage and Type and display red warnings in an S-Control.

 

All this is working well except for attachments.

 

The below custom button makes it easy for a user to add an attachment e.g. a proposal.

 

We track the number of attachments in a custom field (updated every 15 minutes from SQL Server) and compare this with the Attachment KPI field displaying a warning.

 

An issue with the above is that we still have a warning displayed for up to 15 minutes after they have added an attachment.

 

It is not possible in Salesforce to have Workflow or a trigger running reliably against the Attachment object.

 

I'm wondering whether there was a way to change the below URL in such a way so that it generated a field update in Salesforce on the opportunity. I could then use this update to hide the warning till the next SQL Server update.

 

 

 

/p/attach/NoteAttach?pid={!Opportunity.Id}&parentname={!Opportunity.Name}&retURL=%2F{!Opportunity.Id}

 

 

  • February 04, 2011
  • Like
  • 0

I am fairly new to triggers and need help writing the following trigger:

 

Update customer numeric field on opportunity with count of attachements when a new attachment added to the opportunity.

 

 

  • November 22, 2010
  • Like
  • 0

I would like to refresh my Sandbox but before doing so want to save all the Classes and Pages I have been experimenting with.

 

Would appreciate a high check list of the steps I need to follow to ensure Sandbox classes and pages are securely saved (on a network drive) and how I could later import these into a refreshed Sandbox or Developer Org?

 

 

  • July 15, 2010
  • Like
  • 0

I have a new work pc ((Windows 7 64 bit) and want to install Force.com IDE

 

I downloaded the standalone Windows 64 installation and after configuring proxy settings as per the advice of our Tech Services proceeded to install but the Pulse installation seems to freeze half way through.

 

Tried the same installation on my home PC but seems to stop installing half way through "Installing Force.com IDE: Fetching software - 44.9 MB remains

 

Are there any detailed installation instructions for standalone installation. Or any advice?

 

I previously used Force.com under Eclipse on my Windows XP PC but only need Eclipse for Salesforce.

 

Screen grab 

 

 

 

 

  • July 02, 2010
  • Like
  • 0
I would like to update a custom field "Division" on Account page with "Division" from Account Owner's User record. Same thing with Department.
 
I thought I could achieve this using workflow but seems not possible, so wonder whether possible with an S-Control?
  • December 17, 2007
  • Like
  • 0

New to triggers and trying to find a code example to do the following:

 

Child opportunities linked to parent opportunites on Parent_Opportunity__c lookup

 

If parent CloseDate or StageName changes, I would like a trigger to update all child opportuntiies

  • November 05, 2013
  • Like
  • 0

I would like a button on opportunities which can be clicked to update child opportunities

 

I have tried to adapt code I found on this forum but the below code updates the parent rather than the children. I don't have much javascript knowledge.

 

Child opportunities linked to parent opportunities via Parent_Opportunity__c lookup. Child Relationship Name is Child_Opportunities.

 

 

{!REQUIRESCRIPT("/soap/ajax/23.0/connection.js")}

try
{
var strQuery="Select Id from Opportunity where Parent_Opportunity__c = '" +'{!Opportunity.Id}'+"'";

var newRecords = [];

var otherP = sforce.connection.query(strQuery);
var records = otherP.getArray("records");
for(var i=0; i < records.length ; i ++)
{
	var ob = new sforce.SObject("opportunity");
        ob.Id = records[i].Id;
	newRecords.push(ob);
}
var thisOb = new sforce.SObject("opportunity");
thisOb.Id = "{!Opportunity.Id}";
thisOb.StageName= "{!Opportunity.StageName}";
thisOb.Status__c= "{!Opportunity.Status__c}";

var result = sforce.connection.update([thisOb]);
result = sforce.connection.update(newRecords);

alert(result);
location.reload(true);

}catch(er)
{
	alert(er);
}

 

  • October 31, 2013
  • Like
  • 0

I'd like to put some text alongside a dashboard refresh button, perhaps alongside id: db_refresh_time

 

Something like "Click refresh to update dashboard"

 

I have experimented with a VisualForce dashboard component but can't get this to work.

 

Any ideas?

  • March 13, 2012
  • Like
  • 0

I am trying to create a hyperlink on a Visualforce Account page which will open an opportunity report.

 

Both the below variations run the report with an 18 character account id when the report requires a 15 character Account Id

 

<a href="/00OS0000000wS5N?pv0={!Account.Id}">Open Opportunities</a>

 

<apex:outputLink value="/00OS0000000wS5N?pv0={!account.id}">Open Opportunities</apex:outputLink>

 I'd appreciate advice as to what I am doing wrong.

  • February 03, 2012
  • Like
  • 0

Newbie to Visual Force

 

Currently I have 3 Account record types:

 

Master

Standard

 

Account Group

 

The first two use a standard account page

 

The last one uses a standard page Account Group.

 

I would like to build a Visual Force page for when users are viewing an Account Group record type.

 

Is this possible and how would I achieve this?

 

I would prefer to continue using a non Visual Force page for normal Accounts as this is much easier to maintain using drag and drop.

 

My Account Group layout only has a few fields and related lists so will be easy to maintain as a Visual Force page. My reason for wanting to use Visual Force for the Account Group is to be able to have different labels for some of the fields, to get rid of the view hierarchy link etc. etc.

  • January 19, 2012
  • Like
  • 0

I am fairly new to triggers and need help writing the following trigger:

 

Update customer numeric field on opportunity with count of attachements when a new attachment added to the opportunity.

 

 

  • November 22, 2010
  • Like
  • 0

I would like to refresh my Sandbox but before doing so want to save all the Classes and Pages I have been experimenting with.

 

Would appreciate a high check list of the steps I need to follow to ensure Sandbox classes and pages are securely saved (on a network drive) and how I could later import these into a refreshed Sandbox or Developer Org?

 

 

  • July 15, 2010
  • Like
  • 0

I have a new work pc ((Windows 7 64 bit) and want to install Force.com IDE

 

I downloaded the standalone Windows 64 installation and after configuring proxy settings as per the advice of our Tech Services proceeded to install but the Pulse installation seems to freeze half way through.

 

Tried the same installation on my home PC but seems to stop installing half way through "Installing Force.com IDE: Fetching software - 44.9 MB remains

 

Are there any detailed installation instructions for standalone installation. Or any advice?

 

I previously used Force.com under Eclipse on my Windows XP PC but only need Eclipse for Salesforce.

 

Screen grab 

 

 

 

 

  • July 02, 2010
  • Like
  • 0