• sadik Shaik
  • NEWBIE
  • 5 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 4
    Replies
I would like to extra add space between two strings and insert that into a text area field from a trigger. The text should look like
Avalible Date         Quantity 

Please suggest me..
I have a long text area field on QuoteLineItem object. I want to format the field something like this 
ShippedDate Quanity
02/23/2019      2
02/22/2019      4

I have a trigger something like this 
 List<QuoteLineItem> QLIShipItems = 
        [SELECT Id,ShipLineItemValues__c,Customer_Part_Number__c, (SELECT Confirmed_Quantity__c,Request_Confirmed_Date__c FROM Line_Item_Schedules__r) 
         FROM QuoteLineItem WHERE Id IN :Trigger.New];
            
            system.debug('QLIShipItems==='+QLIShipItems);
            
               // Map<Id, List<Line_Item_Schedule__c>> m = new Map<Id, List<Line_Item_Schedule__c>>();
            list<Line_Item_Schedule__c> LineItemScheduls= new List<Line_Item_Schedule__c>();
            list<QuoteLineItem> qtsToUpdate = new list<QuoteLineItem>();
             for(QuoteLineItem qlI : QLIShipItems ){
                 if(qli.Line_Item_Schedules__r!=null && !qli.Line_Item_Schedules__r.isEmpty()){
                     
                     system.debug('LineItemScheduls==='+qli.Line_Item_Schedules__r);
                     
                     for(Line_Item_Schedule__c lis : qli.Line_Item_Schedules__r ){
                         LineItemScheduls.add(lis);
                         qli.ShipLineItemValues__c = string.valueOf(lis.Request_Confirmed_Date__c);
                     }
                     qtsToUpdate.add(qlI);
                     system.debug('eachQtsToUpdate===='+qlI);
                 }
        }
           update  qtsToUpdate;   
                        
        }

Need your suggestions. Thanks in advance
I have an email template with letetrhead and i am accessing it in code and replacing some merge fields.The lettehead which i have is not being shown in the emails but the getting the content as it is. Any idea on this, thanks in advance.

[Select Id,User.id,TeamMemberRole from AccountTeamMember where Account.Id =: currentacc ];


This code gives me (AccountTeamMember:{Id=01M0Q000000BOpJUAW, UserId=0051r000008izgPAAQ, TeamMemberRole=Deal Support - Product Management, AccountId=0010Q000003EwAaQAK}, AccountTeamMember:{Id=01M0Q000000A50ZUAS, UserId=0051r000008kFJRAA2, TeamMemberRole=Account Owner, AccountId=0010Q000003EwAaQAK})

And then i would like to get user details from the above user.id from User object and then Return a list of maps, for each map kay(Account team memberID: i want a list of user details and team member role.  How can ia cheive this. Below is my code 
 
List<AccountTeamMember> AccountTeamMemberList = [Select Id,User.id,TeamMemberRole from AccountTeamMember where Account.Id =: currentacc ];


 
This query Select Id,User.name,TeamMemberRole from AccountTeamMember where Account.Id ='accontID' in query editor gives username wrt user.name but when i run the same query in Execute Anonymous the debug log gives me Userid for User.Name. What do you guys think the reason is? Appreciate your help
List<AccountTeamMember> AccountTeamMemberList = [Select Id,User.Name,TeamMemberRole from AccountTeamMember where Account.Id =: currentacc ];
This code gives log like (AccountTeamMember:{Id=01M0Q000000BOpJUAW, UserId=0051r000008izgPAAQ, TeamMemberRole=Deal Support - Product Management, AccountId=0010Q000003EwAaQAK}, AccountTeamMember:{Id=01M0Q000000A50ZUAS, UserId=0051r000008kFJRAA2, TeamMemberRole=Account Owner, AccountId=0010Q000003EwAaQAK})

If i run this query in Query Editor I am able to get User.Name in the result. wehre as above code is giving me user ID not UserName. How can i get userName from AccountTeam member object. Thanks in advance.
I have a list of maps like ({DK=1, EC=3, JH=5, NT=3, PK=2}, {DK=1, EC=24, JH=31, NT=66, PK=1}). if you look at here both maps having same keys, i want to club the values of same key into an array for eacy key some thing like this ({DK=[1,1]},{EC=[3,24]},{JH=[5,31]}). How can i acheive this, thanks in advance.
This query Select Id,User.name,TeamMemberRole from AccountTeamMember where Account.Id ='accontID' in query editor gives username wrt user.name but when i run the same query in Execute Anonymous the debug log gives me Userid for User.Name. What do you guys think the reason is? Appreciate your help
I would like to extra add space between two strings and insert that into a text area field from a trigger. The text should look like
Avalible Date         Quantity 

Please suggest me..
I have an email template with letetrhead and i am accessing it in code and replacing some merge fields.The lettehead which i have is not being shown in the emails but the getting the content as it is. Any idea on this, thanks in advance.

[Select Id,User.id,TeamMemberRole from AccountTeamMember where Account.Id =: currentacc ];


This code gives me (AccountTeamMember:{Id=01M0Q000000BOpJUAW, UserId=0051r000008izgPAAQ, TeamMemberRole=Deal Support - Product Management, AccountId=0010Q000003EwAaQAK}, AccountTeamMember:{Id=01M0Q000000A50ZUAS, UserId=0051r000008kFJRAA2, TeamMemberRole=Account Owner, AccountId=0010Q000003EwAaQAK})

And then i would like to get user details from the above user.id from User object and then Return a list of maps, for each map kay(Account team memberID: i want a list of user details and team member role.  How can ia cheive this. Below is my code 
 
List<AccountTeamMember> AccountTeamMemberList = [Select Id,User.id,TeamMemberRole from AccountTeamMember where Account.Id =: currentacc ];