• sasham
  • NEWBIE
  • 30 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 40
    Questions
  • 42
    Replies
Hi 
We are still classic and not in lightming experice. I need to build a record detail page and edit page  for lightning in Visualforce . 
Basically , I an trying to override view and edit with lightning component in visualforce page. 
Is it possible for using stadard lightning record detail page in visualforce or what is the best approach for this 
  • December 07, 2018
  • Like
  • 0
Hi Anybody can help on this 
Created custom lightining  component and uploded image (Using Apex code )
ContentVersion Ver = new ContentVersion();
        Ver .ContentLocation = 'S'; 
        Ver.PathOnClient = 'x.png'; 
        Ver.Title = fileName; // Display name of the files
        Ver .VersionData = EncodingUtil.base64Decode(base64Data);
        Ver .isMajorVersion = false; 
        insert Ver ;

And then 
 Id conDocId = [SELECT ContentDocumentId FROM ContentVersion WHERE Id =:Ver.Id].ContentDocumentId;
        ContentDocumentLink doc = new ContentDocumentLink();
        doc.ContentDocumentId = conDocId;
        doc.LinkedEntityId = parentId; 
        doc.Visibility = 'AllUsers';
        doc].ShareType = 'V';
        insert doc

After uploaded, I need get this image link (which is public) by quering for this image. Note that many images have been uploaded to the same record.
 
  • December 04, 2018
  • Like
  • 0

Hi, 
I am inserting image from custom file upload using lightning. it is saved using conntentVersion  object and link to the particular record to the custom object using ContentDocumentLink
but i need to save the image link for that image which can be used in website that is public in a custom field. 
how to get the imagelink for that image. 
 
  • December 03, 2018
  • Like
  • 0
Hi, 
I am inserting image from custom file upload using lightning. it is saved using conntentVersion  object and link to the particular record to the custom object using ContentDocumentLink
but i need to save the image link for that image which can be used in website that is public in a custom field. 
how to get the imagelink for that image. 
 
  • December 03, 2018
  • Like
  • 0
Hi , 
I have uploaded image to custom object using lightning coponnet using visualforce page and save it to file (using contentversion object). now  image i need to send the image to marketting cloud . is it possible using Rest api or images saved in file in salesforce can be stored in maerketing cloud as external system
  • November 01, 2018
  • Like
  • 0
File upload lightning componentis not vissible inside visualforce page  pls hlep , cant we use File upload lightning component for visualforce page
  • October 29, 2018
  • Like
  • 0
File upload lightning component is not vissible inside visualforce page 
pls hlep , cant we use File upload lightning component for visualforce page 

 
  • October 29, 2018
  • Like
  • 0
I need to  create Pdf document when record is updated in custom object called Customer__C using some of the values that updated and then attched the pdf to attchement Object for the customer id  
  • October 12, 2018
  • Like
  • 0
I have a map called memberUpdatmap which has some membe'srecord from member object . key is the id 
Map <Id, member__c> memberUpdatmap = new Map <Id, member__c>();
I have an other map  memberUpdatmap2 which has some member records and some record has same id from memberUpdatmap.
but i do not have all the fields for those records from memberUpdatmap .
I need to update all members at one time (one dml statement) .from both map. how do i get all the records from memberUpdatmap  to memberUpdatmap2.

Example: Pls answer this 
Map <Id, member__c> memberMap = new Map <Id, member__c>();
member__c p1 = new member__c();
p1.Id = id;
p1.put('FirstName__c', 'testaug1');
p1.put('coacher__c', '34561');
p1.put('LastName__c', 'check');
memberMap.put(p1.Id ,p1);
Map <Id, member__c> memberUpdateMap2 = new Map <Id, member__c>();
p2.Id = id;
p2.put('FirstName__c', 'testaug1');
p2.put('Employee__c', 'xyZ');
p2.put('LastName__c', 'check');
memberMap2.put(p2.Id ,p2);
p3.Id = id;
p3.put('FirstName__c', 'testaug2');
p3.put('Employee__c', 'xyZ');
p3.put('LastName__c', 'check1');
memberMap2.put(p3.Id ,p3);

but p2.id and p1.id are the same member object(id's are same) and  i need to get p1 with all the fields Employee__c, coacher__c in to memberMap2
  • August 10, 2018
  • Like
  • 0
I have to create a list view for user object with some custom fields.which will be assgind for some users based on one Role called TeamMember(Edit and read for only custom filed in the list view) In user object we have role called TeamMember.. Can i create with record type or creating a group for the team mebers and assing to the view and giving access those custome fileds in field accsebility 
  • August 01, 2018
  • Like
  • 0
Hi , 
We have  Member__c obj and MemberState__C objects..MemberState__C  has look up field for Member__c obj. I need to create formula field in Member__c obj. In  MemberState__C obj , we having field state__c and date__c  When the member is active very first time(since we many active state) ,
i need to popolate the formula field called startdate__c  in Member__c using  date__c  in  MemberState__C when state__c is active.. But we can have many active states in  MemberState__C obj per member 
which site is best to create random key (api key and token )
  • April 18, 2018
  • Like
  • 0
If we have field to an SF table and an MC Data Extension, Is it possible to create apex or any script (from salesforce) that catches updates to the field in the SF table and propagates that update to the same field in the MC Data Extension? 
  • April 12, 2018
  • Like
  • 0
Hi . 
I need to update the owner field in a custom object  when a custom field(which has look up to user) changes . I need to check when inserting and updating if the field has value and it is changed , then i need to update owner filed with the value. 

Object : Registration 
custome field : Adviser - look up to user 

need to chnage the owner field in the Registration obj with adviser field.

1)Having a  problem if that before update or after update trigger. 
If  I write after update trigger . I am  wondering if the trigger will run again and again. It will be a recursion. Pls help on this 
  • March 23, 2018
  • Like
  • 0
I need to make a REST callout. I have more than 400 records at time( after bulk insert (more than 400 records ) and  then  need to make callout for sending each record to external sytem)  .
Please guide whcih approach is better to follow
Create a batch and make callouts from the batch (scope is 1)
Or 
Create trigger and then excecute the queueable apex to make callout 
  • February 27, 2018
  • Like
  • 0
I have to  make callout from salesforce to external sysytem. need to send a file as xml (request body to POSt method) 
And i have object for this and all the fields i am querying from this object called  Clientdetails. not sute how to convert as xml fil for Rest service 
<message>
<data>
<result>
<order_code>8798</order_code>
<result_code>pp</result_code>
<units>pp</units>
<value>3</value>
<reference>2-4</reference>
<date>2017-12-14</date>
<normalcy>N</normalcy>
<facility>OO\^Example Labs MMD\^26901 Rod Hills Road\^Calabasas Hills\^CA\^91301\^Dr. Test, MD</facility>
</result>
<result>
<order_code>8798</order_code>
<result_code>pp</result_code>
<units>pp</units>
<value>3</value>
<reference>2-4</reference>
<date>2017-12-14</date>
<normalcy>N</normalcy>
<facility>99\^Example Service MMD\^26901 Rod Hills Road\^Calabasas Hills\^CA\^91301\^Dr. Test, MD</facility>
</result>

</data>
</message>
 
  • February 05, 2018
  • Like
  • 0
It is in Curl for makign Api calout for post method 

curl -H 'Accept: application/xml' -H 'Content-Type:application/xml' \
-u api_key:api_token -d '<message><data><result>
<id>123</id>
<address>cc</address>
<value>5</value>
</result></data></hl7message>'\
'https://example.com/customers/2342/messages

But How do make callout in Apex calss forthe above 
Specially for authentication  -u api_key:api_token
I have api key and token 
  • January 17, 2018
  • Like
  • 0
our client is supposed to send us notification after the resuts has been reviewd. 
1) approval notification 
2)Results  are  availble
these are the urls they asked me to  set up in our end 
http://example.com/notif?id={id}&status=approved
http://example.com/notif?id={id}&status=resulted[&result_type={result}]

For that . I need to setup up an apex class as a REST endpoint for an HTTP GET request that an external system is sending notification.
Please le me know is the right way do or please guide me 
@RestResource(urlMapping='/sample/approvalnotifications')
global without sharing class  Rest_Approval_Notification {

    
    @HttpGet
    global static void doGet() {
        
        System.debug(RestContext.request.requestBody);
        restresponse res=restcontext.response;
        String notification_id = RestContext.request.params.get('id');
        String notification_status = RestContext.request.params.get('status');
        System.debug(notification_id);
        System.debug(notification_status);
		
		//hadling error code and logic for processing 
        
        
        
    }
        
}

 


 
  • January 12, 2018
  • Like
  • 0
I have set up 2  apex class as a REST endpoint for an HTTP GET request that an external system is sending for 2 notification 
such as approved  and result available
http://example.com/notif?id={id}&status=approved
 http://example.com/notif?id={id}&status=resulted[&result_type={result}]
for authentication , we have 3 options 
IP Based Authentication
Token Based Authentication
HTTP Basic Authentication.
Could please  anyone answer , is Token Based Authentication is OAuth  authetication  and how to setup the Token Based Authentication
  • January 11, 2018
  • Like
  • 0
Could you pls some let me know the futue method can be used inside scheduer for long running process 
  • December 18, 2017
  • Like
  • 0
How do i access Api (public rest api , no need acsess token ) form postmen or runscope. but i woks in workbench 
It showing an error  invalid session id . It works in production not in sanbox 
  • November 07, 2017
  • Like
  • 1
Hi 
We are still classic and not in lightming experice. I need to build a record detail page and edit page  for lightning in Visualforce . 
Basically , I an trying to override view and edit with lightning component in visualforce page. 
Is it possible for using stadard lightning record detail page in visualforce or what is the best approach for this 
  • December 07, 2018
  • Like
  • 0

Hi, 
I am inserting image from custom file upload using lightning. it is saved using conntentVersion  object and link to the particular record to the custom object using ContentDocumentLink
but i need to save the image link for that image which can be used in website that is public in a custom field. 
how to get the imagelink for that image. 
 
  • December 03, 2018
  • Like
  • 0
I have a map called memberUpdatmap which has some membe'srecord from member object . key is the id 
Map <Id, member__c> memberUpdatmap = new Map <Id, member__c>();
I have an other map  memberUpdatmap2 which has some member records and some record has same id from memberUpdatmap.
but i do not have all the fields for those records from memberUpdatmap .
I need to update all members at one time (one dml statement) .from both map. how do i get all the records from memberUpdatmap  to memberUpdatmap2.

Example: Pls answer this 
Map <Id, member__c> memberMap = new Map <Id, member__c>();
member__c p1 = new member__c();
p1.Id = id;
p1.put('FirstName__c', 'testaug1');
p1.put('coacher__c', '34561');
p1.put('LastName__c', 'check');
memberMap.put(p1.Id ,p1);
Map <Id, member__c> memberUpdateMap2 = new Map <Id, member__c>();
p2.Id = id;
p2.put('FirstName__c', 'testaug1');
p2.put('Employee__c', 'xyZ');
p2.put('LastName__c', 'check');
memberMap2.put(p2.Id ,p2);
p3.Id = id;
p3.put('FirstName__c', 'testaug2');
p3.put('Employee__c', 'xyZ');
p3.put('LastName__c', 'check1');
memberMap2.put(p3.Id ,p3);

but p2.id and p1.id are the same member object(id's are same) and  i need to get p1 with all the fields Employee__c, coacher__c in to memberMap2
  • August 10, 2018
  • Like
  • 0
I have to create a list view for user object with some custom fields.which will be assgind for some users based on one Role called TeamMember(Edit and read for only custom filed in the list view) In user object we have role called TeamMember.. Can i create with record type or creating a group for the team mebers and assing to the view and giving access those custome fileds in field accsebility 
  • August 01, 2018
  • Like
  • 0
Hi , 
We have  Member__c obj and MemberState__C objects..MemberState__C  has look up field for Member__c obj. I need to create formula field in Member__c obj. In  MemberState__C obj , we having field state__c and date__c  When the member is active very first time(since we many active state) ,
i need to popolate the formula field called startdate__c  in Member__c using  date__c  in  MemberState__C when state__c is active.. But we can have many active states in  MemberState__C obj per member 
I need to make a REST callout. I have more than 400 records at time( after bulk insert (more than 400 records ) and  then  need to make callout for sending each record to external sytem)  .
Please guide whcih approach is better to follow
Create a batch and make callouts from the batch (scope is 1)
Or 
Create trigger and then excecute the queueable apex to make callout 
  • February 27, 2018
  • Like
  • 0
It is in Curl for makign Api calout for post method 

curl -H 'Accept: application/xml' -H 'Content-Type:application/xml' \
-u api_key:api_token -d '<message><data><result>
<id>123</id>
<address>cc</address>
<value>5</value>
</result></data></hl7message>'\
'https://example.com/customers/2342/messages

But How do make callout in Apex calss forthe above 
Specially for authentication  -u api_key:api_token
I have api key and token 
  • January 17, 2018
  • Like
  • 0
our client is supposed to send us notification after the resuts has been reviewd. 
1) approval notification 
2)Results  are  availble
these are the urls they asked me to  set up in our end 
http://example.com/notif?id={id}&status=approved
http://example.com/notif?id={id}&status=resulted[&result_type={result}]

For that . I need to setup up an apex class as a REST endpoint for an HTTP GET request that an external system is sending notification.
Please le me know is the right way do or please guide me 
@RestResource(urlMapping='/sample/approvalnotifications')
global without sharing class  Rest_Approval_Notification {

    
    @HttpGet
    global static void doGet() {
        
        System.debug(RestContext.request.requestBody);
        restresponse res=restcontext.response;
        String notification_id = RestContext.request.params.get('id');
        String notification_status = RestContext.request.params.get('status');
        System.debug(notification_id);
        System.debug(notification_status);
		
		//hadling error code and logic for processing 
        
        
        
    }
        
}

 


 
  • January 12, 2018
  • Like
  • 0
how batch apex will handle this situation. we have more than 2000 paticipants in participant objects and steps and weight object
we need a job to handle everyday to find the highst step amonght participant for ranking and to find most hightest step for participant for specific period of time.
if i set chuck to 1 . how all all the particpant steps can be compared.
 
  • December 07, 2017
  • Like
  • 0
Hi 

We have custom Participant object and custom timezone field(pick list - cetral , eastern arizona and pacific ). for each particiipat , particiipant address (state and zip code) is stored in child object called participantdetail. 
when new participnat is created , how do i populate the time zone  field with thier timezone ( i have  the zip code in address  and is it possible to populate the timezone field using the zip code  ) or any other way.  . 
  • November 14, 2017
  • Like
  • 0
It works in prodction but not in sanbox (acsess token is not required)
  • November 08, 2017
  • Like
  • 0
How do i access Api (public rest api , no need acsess token ) form postmen or runscope. but i woks in workbench 
It showing an error  invalid session id . It works in production not in sanbox 
  • November 07, 2017
  • Like
  • 1
I have all participant and states object (two records registered and assessed ). for some participant is not assesed inthe table evethough it is actually assessed. need to insert those records to states as assesesd 

i have list of patticipant ids and list of  states as assessed 

 if(recs.size()>0 && participantsatates.size()>0) 
         {
              for(participant__c p:recs)
                 {
             
                     for(States__c pstate :participantsatates)
                         
                         {
                            IF (P.Id = pstate.Participant__c)
                            {
                                
                                
                            }
                             
                 
                         }
                 }
  • October 23, 2017
  • Like
  • 0