• mike1983
  • NEWBIE
  • 25 Points
  • Member since 2009

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

Can anyone help me?  I would like to either:

 

1.  Add a link or button that opens an external website, automatically enters my username and password and any search criteria I need.

 

or

 

2.  Add that same functionality to a button.

 

I'd appreciate any help and please ....... i'm not a techy so keep it simple.

  • November 16, 2009
  • Like
  • 0

Ok this is a pretty dumb question/requirement that is a "must have" from one of my clients. I am inclined to just say no, but I am doing my due diligence here. 

 

Is there a way for me to make a salesforce login page custom on a separate site? Basically just create a website with a login that HTTP_Posts to salesforce and logs in a user, maybe using cURL or something.

 

My expectation is that SalesForce would block such attempts as a security risk (I would).  But if someone knows this is either possible or impossible that would be very helpful.

 

Thanks 

Ok So I have 2 objects X and Y. When 2 fields on X are updated I want to Change 2 fields on Y and I am having a bit of trouble wrapping my head arround the code. Both X and Y have a field that is a unique Idenfier and they are the same for both objects. so X and Y may have a field "uniqueId" and if they are tied its = 123 for both. Heres what I am thinking but it seems to be failing can someone tell me whats wrong here. 

 

 

trigger UpdateYwhenXChanges on X__c (after update) { List<Y__c> yObj= new List<Y__c>(); for (X__c changeRec: Trigger.New) { yObj.update(y__c(field1=changeRec.field1, field2=changeRec.field2 where UniqueId=changeRec.UniqueId)); update yObj; } }

 

Any Help or just a code sample of something similar would be great.


Thanks

 

Hi, For starters check out my site on the design gallery at the developer center here:

http://developer.force.com/sitesgallery

 

Right now its in the second row of the first page titled (American Century - Consultant Directory)

 

We were one of the first 30 adopters of the Sites beta and I was the sole developer. I can tell you there are pitfalls to avoid and a plethora of tips and tricks Like working vanity urls (something SalesForce said wasn’t possible: http://americancentury.force.com/hannahkirn ) that can help you get your project done quickly and effectively.

 

I would be happy to provide a resume and any other information you would need.

 

A bit about me I am an expert in Apex(of course) but also PHP JAVA and .NET my extensive consulting work has made me server and language agnostic and can rapidly ramp up to just about any environment.

 

To date I have developed over 150 websites in various platforms and CMS’s ranging from small local mom and pops to large multinationals such as – Starbucks, Walgreens, and JCPennys.

 

I have 3 cloud sites (SalesForce, AWS and Google App Engine).

 

Typically I work off of an upfront bid like a construction project, so you know out the gate, what the cost will be and will not have to estimate based on hourly rates, but I am flexible if you prefer hourly.

 

Open to consulting development or training. What ever you need. Please feel free to contact me here or at mikerametta at gmail dot com, or by phone at 913-486-0414

Is it possible to access site traffic data on a Salesforce app, using native Salesforce objects? I want to create a report that will display the following data for Ideas Base Theme visitors:

 

  • Total visitors
  • Unique visitors
  • Page views, both urls and lapsed time

 

I don't see anything like this in the custom report gui, nor does there appear to be any Sforce objects in the Enterprise WSDL that stores this data.

 

Any guidance is much appreciated.

 

Thanks,

Bill

  • November 17, 2009
  • Like
  • 0

Ok this is a pretty dumb question/requirement that is a "must have" from one of my clients. I am inclined to just say no, but I am doing my due diligence here. 

 

Is there a way for me to make a salesforce login page custom on a separate site? Basically just create a website with a login that HTTP_Posts to salesforce and logs in a user, maybe using cURL or something.

 

My expectation is that SalesForce would block such attempts as a security risk (I would).  But if someone knows this is either possible or impossible that would be very helpful.

 

Thanks 

I am currently running version 3.3.2 of Eclipse with the Force.com IDE version 16.0.0.200906151227.

 

Is that the most current version?  If not where can I find the most current version.

 

Thanks

  • November 17, 2009
  • Like
  • 0

Hi there. 

 

I'd like to enable to public our org's Ideas site.

So I tried following settings, but it doesn't works (it appear "Authorization Required").

 

1. [Setup] - [Develop] - [Sites]

 

  I added Home Page, Ideas Pages, Search Pages, Lookup Page to "Site Standard Pages".

 

 

2. [Setup] - [Create] - [Apps]

 

  I ensured that the "Ideas tab" are available for profile used by my Sites site.

 

 

Probably, it seems that the guest profile can't access Ideas data.

 

Would you tell me any solution for this and what I doing wrong?

 

 

I have an APEX ControllerExtension class which overrides the Edit button.  To make life easy for me, I use a Dynamic SOQL statement to fetch all columns from the Opportunity sObject so they are available for display in the VF page should I need them

 

That is, I create a SOQL statement of the form:

 

'select field1,field2, ...fieldn from Opportunity where id = :oppId'

 

One of my fieldx is a formula field using this formula:

 

 

'First name Last name= ' & $User.FirstName & ' ' & $User.LastName & BR() &
'User.UserType= ' & TEXT($User.UserType) & BR() &
'UserRole.Name=' & $UserRole.Name & BR() &
'UserRole.PortalType=' & TEXT($UserRole.PortalType) & BR() &
'Profile.LicenseType=' & TEXT($Profile.LicenseType) & BR()

If this fieldx is included in either a dynamic SOQL or static SOQL expression, at run time, when executed from the Partner Portal by a partner Portal user, I get:

 

System.Exception: Internal Salesforce.com Query Error

and not much else.

 

Obviously, there is something this formula field does that messes up the SOQL call -- although the field displays fine on the standard controller user interface detail page (View).

 

I selectively commented out parts of the formula to determine which parts cause the Internal Salesforce.com Query Error

 

TEXT($User.UserType) - If present in the formula field, Internal Salesforce.com Query Error occurs

TEXT($UserRole.PortalType)  - If present in the formula field, Internal Salesforce.com Query Error occurs

 

 

All other expressions in the formula field don't cause an error.

 

I can work around this particular problem but in general, any sObject field should be queryable through SOQL and not depend on the formula expression.  Why it works through the standard controller UI and not through a controller extension SOQl (static or dynamic) is unknown.

 

Hopefully, this will help someone out in the future

 

 

 

 

 

 

 

Can anyone help me?  I would like to either:

 

1.  Add a link or button that opens an external website, automatically enters my username and password and any search criteria I need.

 

or

 

2.  Add that same functionality to a button.

 

I'd appreciate any help and please ....... i'm not a techy so keep it simple.

  • November 16, 2009
  • Like
  • 0

HI,

I'm writing a custom edit page to edit a current record. Basically I created a custom edit button to

replace the standard button. When a user click on the edit button of any record, how do you capture

the selected record? I don't know how to capture the current record for editing. I got a null result

from the following SOQL statement. Any help with sample codes would be appreciated. thanks

 

Paul

 

Time_Tracking__c ed = [SELECT OwnerId, Project__c, Status__c, Date__c, Department__c, Start_Time__c, Stop_Time__c, Time_Code__c from Time_Tracking__c WHERE id =: ApexPages.currentPage().getParameters().get('id')];

  • September 30, 2009
  • Like
  • 0

I wish to use apex code to create developer account. Please guide me on how I can do this.

  • September 30, 2009
  • Like
  • 0

Ok So I have this trigger on the Opportunity Object

 

trigger OppertunityUpdate on Opportunity (after insert, after update) {

public void UpdateOpportunities(ID opId) {

Opportunity o = [Select o.Id, o.Total_Freight__c, o.Total_Sales_Tax__c, o.Total_Installation__c,

o.Amount, o.Adjustment5__c, o.Adjustment4__c, o.Adjustment3__c,

o.Adjustment2__c, o.Adjustment1__c, o.CanRunTrigger__c

From Opportunity o where o.Id = :opId];

List<PricebookEntry> pbes = [Select p.Product2Id, p.Name, p.Id

From PricebookEntry p

Where p.Product2.name

in ('SalesTax','Freight','Discount1','Discount2','Discount3','Discount4','Discount5','Installation')

order by p.Product2.name ]; List<OpportunityLineItem> oli = [Select o.Id, o.OpportunityId From OpportunityLineItem o

where o.PricebookEntry.id in :pbes

and o.OpportunityId = :o.Id order by o.PricebookEntry.Product2.name];

System.Debug('OliCount: ' + oli.size());

Decimal oliCount = [Select count()

From OpportunityLineItem o

where o.PricebookEntry.id not in :pbes

and o.OpportunityId = :o.Id];

System.Debug('TotalOliSize: ' + oliCount +', o:' + o.id);

if(oliCount < 1) return; if(oli.size() <> 8)

{

System.Debug('Creating new olis');

//Delete oli if size <8 and > 0

if(oli.size() > 0)

delete oli;

oli = new List<OpportunityLineItem>();

//Adding discount1

oli.add( new OpportunityLineItem(Quantity = 1,

OpportunityId = o.Id, TotalPrice = o.Adjustment1__c == null ? 0: o.Adjustment1__c,

PriceBookEntryId = pbes[0].id, order__c = 10001));

//Adding discount2

oli.add( new OpportunityLineItem(Quantity = 1,

OpportunityId = o.Id, TotalPrice = o.Adjustment2__c == null ? 0: o.Adjustment2__c,

PriceBookEntryId = pbes[1].id, order__c = 10002));

//Adding discount3

oli.add( new OpportunityLineItem(Quantity = 1,

OpportunityId = o.Id, TotalPrice = o.Adjustment3__c == null ? 0: o.Adjustment3__c,

PriceBookEntryId = pbes[2].id, order__c = 10003));

//Adding discount4

oli.add( new OpportunityLineItem(Quantity = 1,

OpportunityId = o.Id, TotalPrice = o.Adjustment4__c == null ? 0: o.Adjustment4__c,

PriceBookEntryId = pbes[3].id, order__c = 10004));

//Adding discount5

oli.add( new OpportunityLineItem(Quantity = 1,

OpportunityId = o.Id, TotalPrice = o.Adjustment5__c == null ? 0: o.Adjustment5__c,

PriceBookEntryId = pbes[4].id, order__c = 10005));

//Adding Installation

oli.add( new OpportunityLineItem(Quantity = 1, OpportunityId = o.Id,

TotalPrice = o.Total_Installation__c == null ? 0: o.Total_Installation__c,

PriceBookEntryId = pbes[7].id, order__c = 10006));

//Adding freight

oli.add( new OpportunityLineItem(OpportunityId = o.Id,

Quantity = 1, TotalPrice = o.Total_Freight__c == null ? 0 : o.Total_Freight__c,

PriceBookEntryId = pbes[5].Id, order__c = 10007));

//adding SalesTax

oli.add( new OpportunityLineItem(Quantity = 1, OpportunityId = o.Id,

TotalPrice = o.Total_Sales_Tax__c == null ? 0: o.Total_Sales_Tax__c,

PriceBookEntryId = pbes[6].id, order__c = 10008));

upsert oli;

return;

}

System.Debug('Updating olis');

oli[0].TotalPrice = o.Adjustment1__c == null ? 0: o.Adjustment1__c;

oli[1].TotalPrice = o.Adjustment2__c == null ? 0: o.Adjustment2__c;

oli[2].TotalPrice = o.Adjustment3__c == null ? 0: o.Adjustment3__c;

oli[3].TotalPrice = o.Adjustment4__c == null ? 0: o.Adjustment4__c;

oli[4].TotalPrice = o.Adjustment5__c == null ? 0: o.Adjustment5__c;

oli[5].TotalPrice = o.Total_Installation__c == null ? 0: o.Total_Installation__c;

oli[6].TotalPrice = o.Total_Freight__c == null ? 0 : o.Total_Freight__c;

oli[7].TotalPrice = o.Total_Sales_Tax__c == null ? 0: o.Total_Sales_Tax__c;

Decimal counter = 1;

for(OpportunityLineItem ol: oli)

{

ol.order__c = 10000 + counter;

counter ++;

}

update oli;

}

}

 


 

 

 

 

Heres my test case in a seperate class

@isTest

private class TestOpportunityTriggers {

public static testMethod void testOppTrigger(){

Opportunity z = new Opportunity( name='Test',StageName='Closed Won',

CloseDate=Date.valueof('2008-05-01'), Amount=1.25, Adjustment5__c=1.25,

Adjustment4__c=1.25, Adjustment3__c=7.25, Adjustment2__c=0, Adjustment1__c=3,

CanRunTrigger__c=true);

insert z;

update z;

}

}

 


 

 

 

But my Force.com IDE keeps saying 0% of my trigger is covered and I need atleast 1% but when I run in the the browser it says it has 100% coverage.

 

What am i missing? Please any help would be great

Message Edited by mike83 on 09-18-2009 09:26 AM
Message Edited by mike83 on 09-18-2009 09:32 AM
  • September 18, 2009
  • Like
  • 0

What is current market rate for Force.com Developer who is a Visualforce/Apex Expert?