• NSmyrnos
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 4
    Replies

I am trying to create a detail page link on a custom object that opens a URL that has been entered into another custom field on that record.  Unfortunately, if I use a merge field value, the link fails every time.  I can hardcode the exact same value into the detail page link, and it opens successfully.  I've tried using both a URL and straight text field and using the URLEncode function, but nothing seems to make it work.

 

Any ideas on what I am doing wrong?

I'm currently setting up a Customer Portal for my organization and am running into an annoying issue:

 

I have several Custom Objects types that the Customer Portal users can create new records for in the CP.  These Custom Objects are all related to Accounts via a lookup field. I need to attach these records to the Account that the Customer Portal User belongs to. 

 

Unfortunately, the Account field does not get auto-populated when the CP users hit the New button.  On top of that, when they use the lookup feature, it does not show them all records they have access to by default and the user has to punch in a partial account name.

 

I've looked at Apex and it looks like it doesn not expose the ContactID field from the Users object.  

 

What would be the best way to look up the Account that a Customer Portal User belongs to and apply that to an Account Lookup field when they create a new record?

Hello,

 

I am trying to create a custom Accounts button that will pre-populate fields in a new Opportunity (i.e. Opportunity Name, Stage, Product).  I have been able to get the button to populate the Account field, but updating other fields does not seem to work.

 

Here is my S-Control:

 

<html>
<head>

<script>

window.parent.location.href="{!URLFOR(  $Action.Opportunity.New ,  null, [accid= Account.Id   ,    Opportunity.Name ="Test"]  , true)}";


</script>
</head>
<body onload="init()">
<p>&nbsp;</p>
</body>
</html>

 

 

Any ideas on what I am doing wrong?

Other than creating and referencing a static list in workflow designer, is there any way to control the sorting of the drop-down in a choice lookup element?

 

I have a choice lookup element that references a custom object in Salesforce.  The column value that I am displaying is the Name of the custom object and I would like the drop-down to sort in order on this Name; however, when selecting this drop-down, the Names are listed randomly...probably keying off of some other column.  

I do not see a way in either the choice lookup element or the question element to control the sort order for the drop-down.  If it was a simple question not connected to a choice element, there is control, but not when connecting to a choice lookup.  

I'm currently setting up a Customer Portal for my organization and am running into an annoying issue:

 

I have several Custom Objects types that the Customer Portal users can create new records for in the CP.  These Custom Objects are all related to Accounts via a lookup field. I need to attach these records to the Account that the Customer Portal User belongs to. 

 

Unfortunately, the Account field does not get auto-populated when the CP users hit the New button.  On top of that, when they use the lookup feature, it does not show them all records they have access to by default and the user has to punch in a partial account name.

 

I've looked at Apex and it looks like it doesn not expose the ContactID field from the Users object.  

 

What would be the best way to look up the Account that a Customer Portal User belongs to and apply that to an Account Lookup field when they create a new record?

Hello,

 

I am trying to create a custom Accounts button that will pre-populate fields in a new Opportunity (i.e. Opportunity Name, Stage, Product).  I have been able to get the button to populate the Account field, but updating other fields does not seem to work.

 

Here is my S-Control:

 

<html>
<head>

<script>

window.parent.location.href="{!URLFOR(  $Action.Opportunity.New ,  null, [accid= Account.Id   ,    Opportunity.Name ="Test"]  , true)}";


</script>
</head>
<body onload="init()">
<p>&nbsp;</p>
</body>
</html>

 

 

Any ideas on what I am doing wrong?

I have an Apex class that I want to call from a button.  But I can't figure out how to call it from a button.
Note: I have tested this code inside a trigger and it works fine.
 
My button code is just (obviously this is wrong):
sforce.apex.execute("MyHelloWorld","doKPI", {});
 
The class code:
global class MyHelloWorld {

  WebService static void doKPI() {

    INTEGER NUM = 10;

    KPI__c[] tblkpi;

    tblkpi = new KPI__c[NUM];

    for (integer i = 0; i < NUM; i++) {
      tblkpi[i] = new KPI__c(UserName__c='user '+i, Signed_Contracts__c = i);
    }
    insert tblkpi;
  }
}