• rumdumdum
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 7
    Replies

Hi All,

 

Here's my case, I've got 5 URL fields for opportunity attachments in the Documentation section:

 

doc

 

 

When someone click the Add link they are take to the standard attachment upload page. When the document is attached an after insert trigger fires and updates the parent record(Opportunity) with the attachment link.

 

The problem i'm having is how to distinguish what type of document is uploaded so the appropriate URL field is updated.

 

Tried few workarounds without success.

 

Would appreciate your help and suggestion.

 

Thanks

Richard

Hey Guys,

 

Looking for a way to restrict a trigger when a specific opportunity record type isn't selected.

 

My Code:

 

 

 

trigger Opportunity on Opportunity (after insert) {

List<OpportunityLineItem> blineItems = new List<OpportunityLineItem>();

 

for(Opportunity o : trigger.new){

string a;

string b = o.Product2__c;

String c = o.RecordTypeId;

 

if(c == '012T00000000LSb') {

if(b == 'VOIP') {a = '01uT0000000zxBPIAY';}

else if(b == 'Radio') {a = '01uT0000000zxC9IAI';}

else {a = '01uT0000000zxC2IAI';}

 

blineItems.add(new OpportunityLineItem(quantity = o.Product_Quantity__c,

UnitPrice = o.Product_Price__c,

OpportunityId = o.Id,

pricebookentryid = a

));

}

}

insert blineItems;}

 

  And maybe there's a more efficient way to use Case for PriceBookEntryId's: VOIP, Radio etc...

 

Thanks in advance! 

 

Hey Guys,

 

Trying  to get my head around apex triggers, would appreciate some help:

 

To create a specific product after opportunity is created, but I can't get the id.

 

My Code:

 

 

trigger AddProduct on Opportunity (after insert) { OpportunityLineItem bLineItem = new OpportunityLineItem(); bLineItem.quantity = 1; bLineItem.UnitPrice = 100.00; bLineItem.Opportunityid = ???????????; bLineItem.pricebookentryid = '01uT0000000vtvnIAA'; Insert bLineItem;}

 

I want to insert the ID from a newly created opportunity.

 

Thanks 

 

 

Hi All,

 

Maybe someone can help, I'm looking to find a users guid with screen shots for the Salesforce Mobile application on a windows mobile device. Tried using the Blackberry Developer Simulator to create a manual but was unable to get internet connection for it. Would apriciate if somebody could help.

 

Thanks,

Richrad 

Hi All,

 

Trying to create a validation rule for tasks.

 

I have a picklist field called Type that has multiple values and another field called Name that is a lookup for accounts. 

 

The rules is for users when they select Type picklist value "Sales Meeting Call", Name has to be filled with a lookup.

 

But when I'm creating the rule, in the Insert Field option the lookup field is not visible?

 

Thanks,

Richard 

Hi All,

 

Trying to create a validation rule for tasks.

 

I have a picklist field called Type that has multiple values and another field called Name that is a lookup for accounts. 

 

The rules is for users when they select Type picklist value "Sales Meeting Call", Name has to be filled with a lookup.

 

But when I'm creating the rule, in the Insert Field option the lookup field is not visible?

 

Thanks,

Richard 

Hi everyone,

Writing an HTML S-Control in the part were Java comes in how can you pass(the syntax) a number field from SalesForce to a variable, so that the variable stores a number?

 

ex.

 

Custom Field - {!Account.Dudget__c} 

 

var a= ???

 

 Thanks

Hi everyone,

Writing an HTML S-Control in the part were Java comes in how can you pass(the syntax) a number field from SalesForce to a variable, so that the variable stores a number?

 

ex.

 

Custom Field - {!Account.Dudget__c} 

 

 

var a= ???

 

 

 Thanks

Hi All,

 

Here's my case, I've got 5 URL fields for opportunity attachments in the Documentation section:

 

doc

 

 

When someone click the Add link they are take to the standard attachment upload page. When the document is attached an after insert trigger fires and updates the parent record(Opportunity) with the attachment link.

 

The problem i'm having is how to distinguish what type of document is uploaded so the appropriate URL field is updated.

 

Tried few workarounds without success.

 

Would appreciate your help and suggestion.

 

Thanks

Richard

Hey Guys,

 

Looking for a way to restrict a trigger when a specific opportunity record type isn't selected.

 

My Code:

 

 

 

trigger Opportunity on Opportunity (after insert) {

List<OpportunityLineItem> blineItems = new List<OpportunityLineItem>();

 

for(Opportunity o : trigger.new){

string a;

string b = o.Product2__c;

String c = o.RecordTypeId;

 

if(c == '012T00000000LSb') {

if(b == 'VOIP') {a = '01uT0000000zxBPIAY';}

else if(b == 'Radio') {a = '01uT0000000zxC9IAI';}

else {a = '01uT0000000zxC2IAI';}

 

blineItems.add(new OpportunityLineItem(quantity = o.Product_Quantity__c,

UnitPrice = o.Product_Price__c,

OpportunityId = o.Id,

pricebookentryid = a

));

}

}

insert blineItems;}

 

  And maybe there's a more efficient way to use Case for PriceBookEntryId's: VOIP, Radio etc...

 

Thanks in advance! 

 

Hey Guys,

 

Trying  to get my head around apex triggers, would appreciate some help:

 

To create a specific product after opportunity is created, but I can't get the id.

 

My Code:

 

 

trigger AddProduct on Opportunity (after insert) { OpportunityLineItem bLineItem = new OpportunityLineItem(); bLineItem.quantity = 1; bLineItem.UnitPrice = 100.00; bLineItem.Opportunityid = ???????????; bLineItem.pricebookentryid = '01uT0000000vtvnIAA'; Insert bLineItem;}

 

I want to insert the ID from a newly created opportunity.

 

Thanks 

 

 

Hi All,

 

Maybe someone can help, I'm looking to find a users guid with screen shots for the Salesforce Mobile application on a windows mobile device. Tried using the Blackberry Developer Simulator to create a manual but was unable to get internet connection for it. Would apriciate if somebody could help.

 

Thanks,

Richrad 

Hi everyone,

Writing an HTML S-Control in the part were Java comes in how can you pass(the syntax) a number field from SalesForce to a variable, so that the variable stores a number?

 

ex.

 

Custom Field - {!Account.Dudget__c} 

 

var a= ???

 

 Thanks