• stefanodl
  • NEWBIE
  • 0 Points
  • Member since 2011

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

Hello,

 

I've created a Visualforce Page to generate PDF orders from a custom object (Orders).

In this page there are datatable merging data from Related list of Orders. 

When the pdf is generated those related lista are not in the same order as in the Order Detail Page.

I read that some Apex controller  need to be added to the page.

Can some one help me on this?

 

Thanks,

Stefano di Leone

Hello,

 

I'm trying to add a Sort Button on a custom object, but don't see how to do that without code.

Is that possible?

 

thanks,

 

Stefano

Hello,

 

we have enabled multi-currency in our org. our Standard Currency is EUR and we added USD.

We use pdf documents on a custom object called Order.

When an order (from an opp) is created in USD  all the amount fields on the PDF are shown in USD and EUR as well.

We don't want to show the EUR conversion.

 

 

 

Someone knows how to do that? 

 

Many thanks,

Stefano

Hello,

 

I've just written an Apex Classe in order to modify Opportuniy Name when Stage is greater than a specific values (Order Sent). The code is the following:

 

public class OpportunityAutoTypeName {
 // This method updates the opportunity name at end with (FOG Client Account) w/ Account Name
 public static void addOpportunityAutoTypeName(Opportunity[] accs){
  Set<Id> accId = new Set<Id>();  
  for (Opportunity a:accs){
    if(a.AccountId != null){
      accId.add(a.AccountId);
    }
  }  

  Map<Id,Account> accMap = new Map<Id,Account>([select Id, Name from Account where Id in : accId]);
  for (Opportunity a:accs){
    if(a.StageName >= 'Order Sent'){
    a.Name = a.Name+'-'+accMap.get(a.AccountId).Name+'-'+a.Number_of_hotels_this__c+'H'+'-'+a.Duration_Y__c+'Y'+'-'+a.Type_F__c;
  }
  }
 }
}

Then I wrote a trigger that invoques this class.

All is working but I would like the name changed only once time. How can I avoid that each time the opp is updated the name changes?

 

Can anyone help me?

 

Thanks,

 

Stefano

Hello,

 

I need to create a Trigger on Task Status to update custom field in Account.

 

Each time that a new task (With Type = "Red Code") is created for a specific account (and/or contact?) the related field Red Code on Account should change to TRUE.

When the same task is completed, Red Code should change to FALSE and so on for each new task with Type "Red Code".

 

Can someone help me?

 

Many thanks in advance,

 

Stefano

Hello,

my question is about many-to-many relationship.

I've created three new objects and three new many-to-many relationship in order to relate an account with these three object.

New Objects are

Brand = new object (related to Account) for all those account with type equals to Brand
Group = new object (related to Account) for all those account with type equals to Group
Management Company = new object (related to Account) for all those account with type equals to Management Company

ATB = relationship account-brand
ATG = relationship account-group
ATMC = relationship account-management company

In this way i can relate Accounts with accounts  of the above types (Brand, group and Management company) and for one account I have related list with the other accounts.

Example:

ACC1 = Management company
ACC2 = Brand
ACC3 = Group

ACC1 --> Brand related list will show ACC2 and Group related list will show ACC3

Then I've created triggers in order to create automatically new objects:

if ACC2 is a Brand, the trigger will create a Brand record with name ACC2

Now, my problem is that I can relate ACC1 to ACC2 easily using ATB but I'd like to have the relation ACC2 to ACC1 automatically done.

Can someone help with with this?

Thanks in advance.

Stefano

Hello,

 

I need to create a trigger in order to insert a new opportunity when a speficic condition is verified on existing opportunity.

 

The ruel should be the following:

 

IF Opp is Won and if Opp.NumberField < Acc.Number field THEN insert a new Opp with Type equals to Upsell.

 

Thanks for your help.

 

Stefano

Hello,

 

we have enabled multi-currency in our org. our Standard Currency is EUR and we added USD.

We use pdf documents on a custom object called Order.

When an order (from an opp) is created in USD  all the amount fields on the PDF are shown in USD and EUR as well.

We don't want to show the EUR conversion.

 

 

 

Someone knows how to do that? 

 

Many thanks,

Stefano

Hello,

 

I need to create a trigger in order to insert a new opportunity when a speficic condition is verified on existing opportunity.

 

The ruel should be the following:

 

IF Opp is Won and if Opp.NumberField < Acc.Number field THEN insert a new Opp with Type equals to Upsell.

 

Thanks for your help.

 

Stefano