• AkshaySFDC
  • NEWBIE
  • 0 Points
  • Member since 2018
  • Salesforce Consultant

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

Hello,

I am trying to insert the Forecast Quota for Jan 2021 via the Data loader, but it inserts in Jan2020. Works well for Dec 2020 but not for 2021.

while uploading the s-docs Docx template I have been receiving error

Line 15: Failed to parse XML due to: processing instruction can not have PITarget with reserveld xml name (position: TEXT seen ...<FILE_BODY_SDOCS>\ufeff<?xml ... @1:117) (SDOC)
Error is in expression '{!writeDocumentData}' in page sdoc:sdcreate3: (SDOC)

An unexpected error has occurred. Your solution provider has been notified. (SDOC)

 

 

This page has an error. You might just need to refresh it. First, would you give us some details? (We're reporting this as error ID: -1005328801)
 
I have used Alertify.js on my lightning component to display a warning, once I click 'OK' button on the Alert Box, I always encounter this window attached below.
 
Window

Code Reference :

  alertify.alert('There is Shortage in the added Stock items list').setHeader('<em> WARNING : Cannot Save or Update the Order</em> ');  

 I guess I am not handling the Button action from the Alert Box.
Any idea? what is causing this?

Regards,
Akshay​​​​​​​
 
Error

User Name : 
jagtap.akshay5555@cunning-goat-liwnc0.com
I have got an error while solving trailhead superbadge, can you please guide me with this?
Error :
Challenge Not yet complete... here's what's wrong: 
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: DUVRSLTS
 
Unable to display richtext(Iframe video embedded) field of an object.

Tried by using the two items from the library: <lightning:formattedrichtext> and <aura:unescapedhtml>

1.<lightning:formattedrichtext>, it shows the html content correctly and it also displays the video but unable to expand the video in fullscreen .
2. <aura:unescapedhtml>, with this tag, video is working as expected even fullscreen expansion also working but html tags are not showing correctly. (Ex: for h1,h2 and h3 tags, content size is same)

Any suggession to display both html content along with the video(should be able to expand in full screen) correctly?  
I need to write a trigger for the below requirement:

If a record is inserted in an object phone with name iphone and colour red, then trigger should insert iphone with all the availaible colour- black blue orange and so on

There were 10 colour present in as metadata with name colour, so trigger should create iphone with all the remaining colour except red.
Dear Team ,

In my Personnal info section security token link is missing . How can i search my security token .

Thanks & Regards
Sachin Bhalerao
I basically have standard controller and an apex extension. I need the standard controller to get the current record ID. Then in my extension i use that id to find other related records. When i try to pull these fields from the extra object i get this error: 'Invalid field Title for SObject EmailMessage'

   

    <apex:page standardController="EmailMessage" extensions="EmailFilesApex" Action={!RunSOQL}>
            <apex:pageBlock title="My Content">
          <apex:pageBlockTable value="{!ERecords}" var="Record">
           <apex:column >
            <apex:facet name="header">Account Title</apex:facet>
            <apex:outputText value="{!Record.Title}"/>
           </apex:column>
           <apex:column >
            <apex:facet name="header">Id</apex:facet>
            <apex:outputText value="{!Record.Id}"/>
           </apex:column>
          </apex:pageBlockTable>
        </apex:pageBlock>
        
        </apex:page>

//Class

    public with sharing class EmailFilesApex {
    public String currentRecordId {get;set;}
    public String parameterValue {get;set;}
    public Account acc{get;set;}
    public List<ContentVersion> ERecords {get; set;}    
        
        public EmailFilesApex(ApexPages.StandardController controller) {
            currentRecordId  = ApexPages.CurrentPage().getparameters().get('id');
        }
        
        public void RunSOQL(){
            ERecords = [SELECT Title, Id, FileType FROM ContentVersion WHERE FirstPublishLocationId =:currentRecordId];
    
        }
    }
Hello Salesforce Expertrs 

i am new to the salesforce and i am trying to write test class for the Content document trigger, So when partner user tries a Upload a document through files, automatically he gets email saying that document has been uploaded with the document link, the trigger was successful and with great difficulty i wrote a test class with 100% code coverage, but when i see the test result i see that there is erro "INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY" i have checked in the profile, as well as the OWD settings, still i was not able to resolve this issue, any help will be highly appreciated

User-added image
trigger ContentDocumentTrigger on ContentDocument (after insert) {
    static boolean firstRun = true; 
    if(Trigger.isInsert && Trigger.isAfter){
        for(ContentDocument cd: trigger.new){ 
            if(firstRun){
                if(cd.ownerid!=null){
                    List<user> userlist = [SELECT id,Profile.UserLicense.Name from user WHERE id=:cd.ownerid AND Profile.UserLicense.Name='Partner Community'];
                    if(!userlist.isempty()){
                        List<Partner_Upload_Email_Addresses__mdt> custmeta = [select id,Email_Addresses__c from Partner_Upload_Email_Addresses__mdt];
                        String[] toAddresses = new String[]{};
                            for(Partner_Upload_Email_Addresses__mdt custemailvales: custmeta){
                                toAddresses.add(custemailvales.Email_Addresses__c);
                            }
                        Messaging.Singleemailmessage email = new Messaging.Singleemailmessage();
                        email.setReplyTo('manjuzmail053@gmail.com');
                        email.setSenderDisplayName('Partner Upload File ');
                        //String[] toAddresses = new String[] {'manjuzmail053@gmail.com'};
                        if(!toAddresses.isempty()){
                            email.setToAddresses(toAddresses);
                            String body = '<html><body>Please note: A new document has been added\n \n ';
                            body += 'File name: '+ cd.title+'\n\n' ;
                            body += 'Created By: '+ cd.createdbyid+ '\n\n';
                            body += 'Created Date: '+ cd.CreatedDate+ '\n\n';
                            body += 'link to file: https://moengage--partnersf.lightning.force.com/lightning/r/ContentDocument/'+cd.id+'/view </body></html>';
                            email.setSubject('A new file is uploaded by your Partner with file name :  '+cd.Title);
                            email.setHtmlBody(body);
                            Messaging.sendEmail(new Messaging.SingleEmailmessage[] {email});
                            firstRun = false;
                        }
                    }
                }
            }
        }
    }
}

@isTest
public class ContentDocumentTestclass {
    public static testmethod void ContentDocumentInsertTest()
    {
        List<user> userlist = [SELECT id,Profile.UserLicense.Name,isactive from user WHERE Profile.UserLicense.Name='Partner Community' AND isactive=true];
        
        System.runAs(userlist[1]) {
            // The following code runs as user 'u' 
            System.debug('Current User: ' + UserInfo.getUserName());
            System.debug('Current Profile: ' + UserInfo.getProfileId());

            ContentVersion contentVersionInsert = new ContentVersion(
                Title = 'Tes11t',
                PathOnClient = 'Test1.jpg',
                VersionData = Blob.valueOf('Test 11Content Data'),
                IsMajorVersion = true
            );
            insert contentVersionInsert;
            system.debug('User' + UserInfo.getUserName());
            List<ContentDocument> documents = [SELECT Id, Title, LatestPublishedVersionId FROM ContentDocument];
        }
    }
}

 
This page has an error. You might just need to refresh it. First, would you give us some details? (We're reporting this as error ID: -1005328801)
 
I have used Alertify.js on my lightning component to display a warning, once I click 'OK' button on the Alert Box, I always encounter this window attached below.
 
Window

Code Reference :

  alertify.alert('There is Shortage in the added Stock items list').setHeader('<em> WARNING : Cannot Save or Update the Order</em> ');  

 I guess I am not handling the Button action from the Alert Box.
Any idea? what is causing this?

Regards,
Akshay​​​​​​​