• Ricky Lowe 19
  • NEWBIE
  • 75 Points
  • Member since 2020

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 6
    Replies
I'm new in Saleforce development and would like to ask for a direction. Salesforce provides good platofrm for fast creation of web applications. But what if I need to create a headless application. For example, I'd like to take records of Opportunities or any custom object, then to do some non-trivial manipulations and create new records for another object.
- Where shoudl I start?
- how to host such application: I'd like to avoid taking export data from Salesforce and put data into saleforce from outside (do not host custom developed solution on AWS)
Hi All ,
I have to fill Parent Account field on the Child Account and the only information I've on the Child Account, that I receive through sync, is a number, of the Patent ACcountm stored in a picklist custom field named VENDOR. The same number is stored on the Parent Account as ACCOUNT NUMBER. Can some one suggest a solution on this?

Thanks
Claudio
Bwlow code of my class we we not cover content documt link area
public class BookingTriggerHandler{
    public static void AddNotes(List<Booking__c> lstbook){
        
        List<ContentDocumentLink> insertlst = New List<ContentDocumentLink>();
        Map<id,Booking__c> mapIdtoBooking = New Map<Id,Booking__c>();
        for(Booking__c objbook :lstbook){
            if(objbook.opportunity__c != null){
                mapIdtoBooking.put(objbook.opportunity__c, objbook);
            }
        }
        system.debug('----mapIdtoBooking----'+mapIdtoBooking);
       
        for(ContentDocumentLink objlink:[SELECT Id,LinkedEntityId ,contentDocumentId FROM ContentDocumentLink where LinkedEntityId IN: mapIdtoBooking.keySet()]){
    		ContentDocumentLink obj = New ContentDocumentLink();
    		obj = objlink.clone(false,true);
    		obj.LinkedEntityId = mapIdtoBooking.get(objlink.LinkedEntityId).id;
    		insertlst.add(obj);            
		}
        system.debug('----insertlst----'+insertlst);
        
        if(!insertlst.isEmpty()){
           insert insertlst; 
        }
    }
}
@isTest
public class BookingTriggerHandlerTest{
    static testMethod void Testdata(){
        List<ContentDocumentLink> lstcon = New List<ContentDocumentLink>();
        List<Booking__c> lstbooking = New List<Booking__c>();
        Account objacc = New Account();
        objacc.name = 'Test';
        objacc.Type = 'Press';
        insert objacc;
        
        Opportunity objopp = new Opportunity();
        objopp.name ='Test';
        objopp.StageName ='Closed Won';
        objopp.CloseDate = system.today();
        objopp.Mode_of_Contact__c = 'Telephone';
        objopp.AccountId = objacc.Id;
        insert objopp;
        
        Booking__c objbook = New Booking__c();
        objbook.Name = 'Test';
        objbook.Opportunity__c = objopp.Id;
        lstbooking.add(objbook);
        insert lstbooking;
        List<contentNote> lstnote = New List<contentNote>();
        contentNote objnote = New contentNote();
        objnote.title = 'Test';
        lstnote.add(objnote);
        insert lstnote;
        
        List<ContentDocument> documents = [SELECT Id, Title, LatestPublishedVersionId FROM ContentDocument where Id =:objopp.Id]; 
        if(!documents.isEmpty()){
           ContentDocumentLink contentlink=new ContentDocumentLink();
		   contentlink.ShareType= 'C';
		   contentlink.LinkedEntityId = objopp.Id; 
		   contentlink.ContentDocumentId=documents[0].Id;
		   contentlink.Visibility = 'AllUsers'; 
           lstcon.add(contentlink); 
           System.assertEquals(documents.size(), 1);
        }		
		insert lstcon;
    }
}
acount record has child contact record, if status__c(picklist) field of contact record is 'open' update account description field of account record.
trigger x4 on Account (before update) {
    list<account> accList = new list<account>();
    set<id> idSet = new set<id>();
    for(account acc : trigger.new){
        idSet.add(acc.id);
    }
    list<contact> conList = [Select id, accountid, Status__c from contact where accountId in: idSet];
    map<id,contact> conMap = new map<id,contact>();
    for(contact con : conList){
        conMap.put(con.accountId, con);
    }
    for(account a : trigger.new){
        if(conmap.containsKey(a.id) || conmap.get(a.id).Status__c=='open'){
            a.description = 'account is updated from contact';
            accList.add(a);
        }
    }
    update acclist;
}


 
I'm new in Saleforce development and would like to ask for a direction. Salesforce provides good platofrm for fast creation of web applications. But what if I need to create a headless application. For example, I'd like to take records of Opportunities or any custom object, then to do some non-trivial manipulations and create new records for another object.
- Where shoudl I start?
- how to host such application: I'd like to avoid taking export data from Salesforce and put data into saleforce from outside (do not host custom developed solution on AWS)
Hi All ,
I have to fill Parent Account field on the Child Account and the only information I've on the Child Account, that I receive through sync, is a number, of the Patent ACcountm stored in a picklist custom field named VENDOR. The same number is stored on the Parent Account as ACCOUNT NUMBER. Can some one suggest a solution on this?

Thanks
Claudio
I'm trying to get SAML federation setup with the developer edition of Salesforce.  I'm getting the ACS URL is not correct in the SAML validator.  There is no Salesforce Login URL or ACS URL in my Single Sign on settings.