• ssurfer
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 11
    Replies
For about a week i've been trying to solve a problem with pre-populating a record of a custom object linked to an opportunity. Following the information i've gotten from helpful people here and what i've read, i can see that the solution could be one of two: either i build a java s-control or i build out an HTML code. My question here is what to choose when and why?
 
I have pasted in the two solutions (the java version still not functionning and in it's most basic format, that in theory should only open up the custom object)
 
My impression is that the HTML way is a "cheat" and the Java is the "real" way to go, especially having Apex in mind. Could anyone please enlighten me?
 
Best regards,
Johan
 
 
/setup/ui/recordtypeselect.jsp?retURL=
%2{!Opportunity.Id}&save_new_url=%2Fa0J%2Fe%3FretURL
%3D%25{!Opportunity.AccountId}%26CF00N2000000129Zf
%3D{!Opportunity.Account}%26CF00N2000000129Zf_lkid
%3D{!Opportunity.AccountId}%2600N2000000129Zk
%3D{!Opportunity.Survey_Address__c}%2600N200000012ANk
%3D{!Opportunity.Pack_Date_1__c}&ent=01I200000004VkE
++++++++++++++++
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<script src="/soap/ajax/8.0/connection.js" type="text/javascript"></script>
<script language="javascript">

<script>

function setupPage() {

createWork_Order();

}



function createWork_Order() {

var wo = new sforce.SObject("Work_Order__c");
}
try {


saveResult = sforce.connection.create([wo]);

}catch(error) {

alert("got an error: " + error);

}


if (result[0].getBoolean("success")) {
alert("new Work Order created with id " + result[0].id);
} else {
alert("failed to create Work Order " + result[0]);
}



</script>
</head>
<body onload="setupPage();"></body>
</html>

The purpose of the following code is to copy a few values of the fields of an opportunity, create a linked custom object and populate a few fields with these values. I've seen that several people have problems with this type of code, so i hope that this will be of value to many. I've tried doing this coding using dynabean too, but from what I understand this only works for the first step, copying values from Opportunity. It breaks down before the new object is created.

I'm very grateful for any help i can get.
Best regards,
ssurfer

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<script src="/soap/ajax/8.0/connection.js" type="text/javascript"></script>
<script language="javascript">

function setupPage() {
createWork_Order();

parent.frames.location.replace("/"+Work_Order__c+"/e");
}



function createWork_Order() {

var opId = "{!Opportunity.Id}";
var opRecType = "{!Opportunity.RecordType}";
alert("Opportunity Id= " + opId + "\n Opportunity Record Type= " + opRecType );
var opPackDate = "{! Opportunity.Pack_Date_1__c }";
var work_order = new sforce.SObject("Work_Order__c");
Work_Order.RecordType = opRecType;
Work_Order.opportunity.ID=opID;
Work_Order.Name = "FILL IN WORKORDER NAME";
Work_Order.Pack_Date=opPackDate;
result = sforce.connection.create([Work_Order__c]);

if (result[0].getBoolean("success")) {
log("new Work Order created with id " + result[0].id);
} else {
log("failed to create Work Order " + result[0]);
}
}

</script>
</head>
<body onload="setupPage();"></body>
</html>

Hi,

I've got some problem trying to figure out how the s-controls work. Basically i would like to create an s-control that will create a new custom object (a child object to Opportunity)

This is what i want to achieve:

Create opportunity > populate the fields > save > press link that calls s-controll > grab the content of the fields "Opportunity ID" and "Opportunity Name", "Pack Date" and "Pack Address" > Create new Work Order > Fill in the fields Opportunity ID, Opportunity Name, Pack Date and Pack Address > Leave the window with Work Order open in Edit Mode

I'm a bit lost as where to start, i've tried with Create sObject and i've tried modifying codes that i have found here, but i'm not getting any further. I can't even get it to open a new Work Order without the autofill function.

I would be very grateful if someone could help me get started with this.
I have business that is incoming and outgoing to partners. In order to see what partners bring me most value, i'd like to add a field where i can see the positive or negative value. Under opportunities, we register the partner and partner role. If the partner role is "incoming" it means they're giving us business and if the partner role is "outgoing" we're giving them business.

What i want to see is the balance, taking all the won opportunities for partner x where the role is incoming, adding that up and substracting all the won opportunities where the partner role is outgoing. The problem is that i can't seem to be able to do it, not even in a report... Ideally i'd like it as a custom field under the partner account, but in a report is good enough.

I'm very grateful for help

Best regards,
johan
I'm building an application where we have opportunities logged under each contact. For the email templates that goes out, i'd need to include the salutation and last name of the contact in the salutation field as well as data from the opportunity itself. The easiest way would be if i could make an s-control that just lifts the contact salutation and last name into a custom field of the opportunity and then use that to populate the template.
 
Can anyone please tell me how to create an s-control that will lift salutation and last name from contact to opportunity?
 
I'm very thankful for any hint on how to go about to solve this
 
Best regards,
johan
Hi,
 
I've got a small problem. In a team edition of salesforce, i've got a standard field under opportunities called close date. I was to create a custom formula field that gives me the date 5 bank days from the close date. This means skipping saturday and sunday. I've not been able to solve this, does anyone have any ideas how i can do it?
 
Best regards,
johan
Hi,
 
I've got an app for a shipping company. In the custom contract HTML email template i've made, we need to capture data about a partner (name, email , fax and phone number).
The partner details comes from a standard associated list under opportunitues, as do the quotation details (the custom object from which i'm sending out the email)
 
The hierachy looks like this:
Account>Opportunity>Quotation
Account>Opportunity>Partner
 
How can i capture data from both the partner and quotation objects?
 
I've so far not used any real programming to customize salesforce, so please, if you can, give me a newbie answer
 
Best regards
J
  • September 27, 2006
  • Like
  • 0
Hi,
 
I'm not really sure how to solve this problem, but it's not very complex.
 
Basically we have a back-end system that tracks the payments for the jobs we get. The Job ID carries data about the type of job (two letters)
the year (two digits)
an auto number with 4 digits, the first being tied to the type of job (i know, not highest degree of normalisation)
initials of the salesperson (2 letters)
initials of the marketing person (two letters)
 
Example: IM|06|8012|BT|JS
Where: IM equals the type of job, 06 is the year, 8 confirms that it's and IM job and 012 is the autonumber in the 8 series
 
I think the solution is more towards a change of existing processes rather than complex coding in salesforce, but i can't seem to get a way to solve this. With the current crm system, there's no problem generating the code, but salesforce doesn't have that flexibility.
 
I would be very grateful for any suggestions on how to solve this. Thank you
  • September 06, 2006
  • Like
  • 0
For about a week i've been trying to solve a problem with pre-populating a record of a custom object linked to an opportunity. Following the information i've gotten from helpful people here and what i've read, i can see that the solution could be one of two: either i build a java s-control or i build out an HTML code. My question here is what to choose when and why?
 
I have pasted in the two solutions (the java version still not functionning and in it's most basic format, that in theory should only open up the custom object)
 
My impression is that the HTML way is a "cheat" and the Java is the "real" way to go, especially having Apex in mind. Could anyone please enlighten me?
 
Best regards,
Johan
 
 
/setup/ui/recordtypeselect.jsp?retURL=
%2{!Opportunity.Id}&save_new_url=%2Fa0J%2Fe%3FretURL
%3D%25{!Opportunity.AccountId}%26CF00N2000000129Zf
%3D{!Opportunity.Account}%26CF00N2000000129Zf_lkid
%3D{!Opportunity.AccountId}%2600N2000000129Zk
%3D{!Opportunity.Survey_Address__c}%2600N200000012ANk
%3D{!Opportunity.Pack_Date_1__c}&ent=01I200000004VkE
++++++++++++++++
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<script src="/soap/ajax/8.0/connection.js" type="text/javascript"></script>
<script language="javascript">

<script>

function setupPage() {

createWork_Order();

}



function createWork_Order() {

var wo = new sforce.SObject("Work_Order__c");
}
try {


saveResult = sforce.connection.create([wo]);

}catch(error) {

alert("got an error: " + error);

}


if (result[0].getBoolean("success")) {
alert("new Work Order created with id " + result[0].id);
} else {
alert("failed to create Work Order " + result[0]);
}



</script>
</head>
<body onload="setupPage();"></body>
</html>
I'm trying to create a simple pop-up window to reflow data in a more printable format. I can access all the account fields including my custom fields with no problem, but these are basically appointment cards I'm trying to print and I'd like to grab information about the event as well, such as subject, location, date and time, etc. The event is in the future of my test record, and it is an event, not a task. Why won't event fields show up?

Here I reduced the code to its simplest form.

<html>
<body>
Account Name:{!Account.Name}<br>
Event Subject:{!Event.Subject}<br>
</body>
</html>

When I execute this code, the result is:

Account Name: John Smith
Event Subject:

Any help is appreciated.

The purpose of the following code is to copy a few values of the fields of an opportunity, create a linked custom object and populate a few fields with these values. I've seen that several people have problems with this type of code, so i hope that this will be of value to many. I've tried doing this coding using dynabean too, but from what I understand this only works for the first step, copying values from Opportunity. It breaks down before the new object is created.

I'm very grateful for any help i can get.
Best regards,
ssurfer

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<script src="/soap/ajax/8.0/connection.js" type="text/javascript"></script>
<script language="javascript">

function setupPage() {
createWork_Order();

parent.frames.location.replace("/"+Work_Order__c+"/e");
}



function createWork_Order() {

var opId = "{!Opportunity.Id}";
var opRecType = "{!Opportunity.RecordType}";
alert("Opportunity Id= " + opId + "\n Opportunity Record Type= " + opRecType );
var opPackDate = "{! Opportunity.Pack_Date_1__c }";
var work_order = new sforce.SObject("Work_Order__c");
Work_Order.RecordType = opRecType;
Work_Order.opportunity.ID=opID;
Work_Order.Name = "FILL IN WORKORDER NAME";
Work_Order.Pack_Date=opPackDate;
result = sforce.connection.create([Work_Order__c]);

if (result[0].getBoolean("success")) {
log("new Work Order created with id " + result[0].id);
} else {
log("failed to create Work Order " + result[0]);
}
}

</script>
</head>
<body onload="setupPage();"></body>
</html>

Hi,

I've got some problem trying to figure out how the s-controls work. Basically i would like to create an s-control that will create a new custom object (a child object to Opportunity)

This is what i want to achieve:

Create opportunity > populate the fields > save > press link that calls s-controll > grab the content of the fields "Opportunity ID" and "Opportunity Name", "Pack Date" and "Pack Address" > Create new Work Order > Fill in the fields Opportunity ID, Opportunity Name, Pack Date and Pack Address > Leave the window with Work Order open in Edit Mode

I'm a bit lost as where to start, i've tried with Create sObject and i've tried modifying codes that i have found here, but i'm not getting any further. I can't even get it to open a new Work Order without the autofill function.

I would be very grateful if someone could help me get started with this.
Hi,

I did read the technical requirements PDF which says only IE and Firefox are supported, nevertheless I am hoping to hear some good news about safari.

Salesforce.com basic functionality does work on safari, but the moment I use an S-Control which uses AJAX toolkit and does an sforceclient.login, everything stops working. Has anybody figured out anyway to get this stuff to work on safari? Please do let me know any inputs on this.

Thanks,
VSP.
  • February 01, 2007
  • Like
  • 0
Hi,
 
I've got an app for a shipping company. In the custom contract HTML email template i've made, we need to capture data about a partner (name, email , fax and phone number).
The partner details comes from a standard associated list under opportunitues, as do the quotation details (the custom object from which i'm sending out the email)
 
The hierachy looks like this:
Account>Opportunity>Quotation
Account>Opportunity>Partner
 
How can i capture data from both the partner and quotation objects?
 
I've so far not used any real programming to customize salesforce, so please, if you can, give me a newbie answer
 
Best regards
J
  • September 27, 2006
  • Like
  • 0