• Priyakaran1320
  • NEWBIE
  • 0 Points
  • Member since 2012

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

what if we dont have connected app in our create new app as i want to use canvas app into my saleforce sandbox.

 

 

can anyone tell me how to create that in sandbox.

thanks

 

what if we dont have connected app in our create new app as i want to use canvas app into my saleforce sandbox.

 

 

can anyone tell me how to create that in sandbox.

 

hello guys i have to create a shadow object of a particaular filed which is called status now this is picklist is of two variable in it which are active and inactive.  so for inactive i have to create a shadow object so that i can get to know who are the peeople who are inactive and keep a track of them 

can please let me knw asap.

 

thanks

hey guys i am workin on a code i need to make some adding in i tht if the subscriber is add to a subcription i want tht he doesnt get more then one document. like a subscriber is subcribered to one particular document of that particular type.

like in simple there are a,b,c,d,e these are documents 
so if subscriber 1 is subscribing for a,b,c he can 
but if he is subscribing for 2A,2b 2c den he cant soo we have to make sure tht each subcriber is give one particular doc once and there is no DUPLICATION of doc sent to any subcriber 

  

 

here is the particular code 

@RestResource(urlMapping='/upsertSubscription/*')
global with sharing class upsertSubscription
{
    //Method to add a new subscription for a subscriber. 
    //HTTP Post annotation..... 
    @HttpPost
    global static String addSubscriptions(String name,String email, String docId,String extID,String url,String mode,String subscriptionType,String contentType,Date lastSent)
    {
      Subscriber__c subscriberInstance= new Subscriber__c();
      List<Subscribers__c> subscriberList=[SELECT name,id,Email_Address__c  FROM Subscribers__c WHERE Email_Address__c=:email limit 1];
      system.debug('subscriber----->>'+SubscriberList);
      Document_Subscription__c docSubscription=new Document_Subscription__c();
      List<Document_Subscription__c> DocList=new List<Document_Subscription__c>();
      //Check if the Subscriber exists
      if(SubscriberList.size()==0)
          system.debug(SubscriberList);
      //Insert subscriber;            
      docSubscription.Document_Name__c = name;            
      docSubscription.Document_Id__c = docId;            
      docSubscription.Document_Source_URL__c = url;
      docSubscription.Content_Type__c = contentType;
      docSubscription.Last_Sent__c = lastSent;
      docSubscription.Mode__c = mode;
      docSubscription.Subscription_Type__c = subscriptionType;
      //Loop for each Subscriber
      for(Subscribers__c subscriberObj:subscriberList)
      {
          docSubscription.Subscriber__c=subscriberObj.Id;
          docSubscription.External_ID__c=subscriberObj.name+'-'+docId;
          DocList.add(docSubscription);
      }    
      insert DocList;
      return docSubscription.Id;
    }
       
    //Method to delete subscriptions for a particular subscriber.
    @HttpDelete 
    global static String deleteSelectedSubscriptions() 
    {
      RestRequest req = RestContext.request;        
      String emailAddress = req.params.get('emailAddress');  
      String DocumentId = req.params.get('DocumentId'); 
      Subscriber__c Subscriber= [ Select ID, Name from Subscriber__c where Email_Address__c= :emailAddress LIMIT 1];          
      List<Document_Subscription__c> Subscriptions= [SELECT Id,Name,Subscriber__c, Document_Id__c from Document_Subscription__c 
                                           WHERE Subscriber__c =:Subscriber.name AND Document_Id__c=:DocumentId];
      delete Subscriptions;         
      return Subscriptions[0].Id;  
    }
  
    global static String deleteallSubscriptions()
    {   
      RestRequest req = RestContext.request;        
      String emailAddress = req.params.get('emailAddress');         
      Subscriber__c Subscriber= [ Select ID, Name from Subscriber__c where Email_Address__c= :emailAddress LIMIT 1];          
      List<Document_Subscription__c> Subscriptions= [SELECT Id,Name,Subscriber__c, Document_Id__c from Document_Subscription__c 
                                           WHERE Subscriber__c =:Subscriber.name];
      delete Subscriptions;             
      return 'All Subscriptions Deleted';
    }
    /*         
    @HttpGet
    //method to return list of subscriptions for particular selected subscriber.......         
    global static List<Document_Subscription__c> listSubscriptions()
    {
        RestRequest req = RestContext.request;
        String mailId= req.params.get('email');        
        system.debug('mailId----->>>>'+mailId);
        Subscriber__c sub=[SELECT id, Name FROM Subscriber__c WHERE Email_Address__c=:mailId];
        system.debug('sub----->>>>>>>>>>>>'+sub.Name);
        List<Document_Subscription__c> subscriptions= [SELECT Id,Name,Document_Id__c,Document_Name__c,Content_Type__c,Last_Sent__c,
                                                        Document_Source_URL__c from Document_Subscription__c WHERE Subscriber__c =:sub.name];                       
        return subscriptions;  
    }
    //method to return list of subscribers for one subscription....       
    global static List<Document_Subscription__c> listSubscribers()
    {
        RestRequest req = RestContext.request;
        String docId= req.params.get('docId');        
        system.debug('docId----->>>>'+docId);
        List<Document_Subscription__c> subscribers= [SELECT Id,Name,Subscriber__c ,Document_Name__c,Content_Type__c,Last_Sent__c,
        Document_Source_URL__c from Document_Subscription__c WHERE Document_Id__c =:docId]; 
        System.debug('subscribers----->>>'+subscribers);                      
        return subscribers;  
     } */    
 }

 

hello guys i want to knw a apex code to write the situation is i have a custom field and i want to add my org's website to it tht custom object  is already been coded in apex code in which the field exists but i have to add minor changes like i have to add a url link to a particular link

hey guys i need to work on rest api 

i have to make a service Account which should be functional Account  
As it should pass the credentials and make calls to the salesforce
 
it a start as this account will be used after all the apps are customized it will be tested in this account and so this will be the primary account as everything what is being made will be implemented in this account
 
have to make this service account and test it by passin credentials and do i  get calls back 
 
the api which we are using is REST API.
and Json object
thanks

Hey guys if can help me   i have a situation in which i need a apex logic to fit in a apex class which is already written

the situation is i need to write a trigger in which i have two custom fields which are in two different tabs so wen ever a custmer updated that particular field it has been updated automatically from the team site so now my job is to create a trigger tht wen ever it is update it should fire a trigger that shoots a email to that particular account user.

i need that logic it u guys can help me writing it 

 thanks

Hey guys I need ur hel. I m unable to find a logic for code my situation are I have two fields  and wen theTwo particular fields are changed or updates I should have set a trigger that automatically fire a email to the user . Please any one can help me 

Hey guys if anyone can tell me how to increase the ode coverage of a apex class as I m facing problem in that of sdime one can explain me that in detail it would be great 

Hey guys if can help me   i have a situation in which i need a apex logic to fit in a apex class which is already written

the situation is i need to write a trigger in which i have two custom fields which are in two different tabs so wen ever a custmer updated that particular field it has been updated automatically from the team site so now my job is to create a trigger tht wen ever it is update it should fire a trigger that shoots a email to that particular account user.

i need that logic it u guys can help me writing it 

 thanks