• Terence Viban
  • NEWBIE
  • 75 Points
  • Member since 2014

  • Chatter
    Feed
  • 1
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 13
    Replies
I have two objects parent__c and Teacher__c . There is no relationship between them .no materdetail no lookup . 
only name fields in both parent__c and teacher__c will be treated as common , because we will manual enter the name field . 
Parent fields: name(text )
, teacher_expertise (text)
Teacher Name (text)
Teacher fields :
- name (text)
expertise (picklist) 
Teacher_name( Text Fields)
I would like to update teacher_expertise and Teacher_name  field on parent objects :
Once we update fields on Teacher__c it should update Parent__c.
how can we use maps in this . 
Please help . Urgent
Thanks 
Hi there,
has any one come across this error before?

SCRIPT5022: Action failed: lightning:inputRichText$controller$handleValueChange [Invalid calling object]
Callback failed: apex://MinuteController/ACTION$getTopics
aura_prod.js (8,15)


This error occurs whenever i load any content into the richtext field, say from the database for instance

Lightning inputRichtext is still in beta, but documentation encourages it's use and discourage use of ui:inputRichtText. 

Any ideas?

Thanks
Hi all,

now this is an interesting one. I am working on a test data factory which automates the creation of test data. While creating a User, the factory is trying to create the Delegated Approver as well. I get this error 

 System.DmlException: Insert failed. First exception on row 0; first error: INVALID_TYPE, You can't assign a group or queue as a delegated approver. Select a valid user instead.: [DelegatedApproverId]

The reason for this is apparent when I look at what my factory is doing. The DelegatedApproverId is of type Reference and the reference and I would expect this reference type to be User. But it is Group and I guess tht is why I get this error. Here is a snippet from my debug log

11:06:54.90 (207722531)|USER_DEBUG|[113]|DEBUG|@@@@ buildSObject fName : DelegatedApproverId
11:06:54.90 (207934427)|USER_DEBUG|[116]|DEBUG|@@@@ buildSObject field.getName() : DelegatedApproverId
11:06:54.90 (207988984)|USER_DEBUG|[117]|DEBUG|@@@@ buildSObject field.getType().name() : REFERENCE
11:06:54.90 (208020802)|USER_DEBUG|[118]|DEBUG|@@@@ buildSObject field.isNillable : true
11:06:54.90 (208057314)|USER_DEBUG|[120]|DEBUG|@@@@ buildSObject compoundField : user_delegatedapproverid
11:06:54.90 (208284455)|USER_DEBUG|[226]|DEBUG|================================== REFERENCE (REFERENCE) ===================================
11:06:54.90 (208480665)|USER_DEBUG|[228]|DEBUG|@@@@ buildSObject referenceType : Group
11:06:54.90 (208513637)|USER_DEBUG|[229]|DEBUG|@@@@ buildSObject referenceType fieldNameValuePairs : {LastName=Viban}
11:06:54.90 (208527259)|USER_DEBUG|[230]|DEBUG|@@@@ buildSObject referenceType field.getName() : DelegatedApproverId
11:06:54.90 (208564003)|USER_DEBUG|[243]|DEBUG|@@@@ buildSObject referenceType objNameReferenceNameIdPairs : {}
11:06:54.90 (208574814)|USER_DEBUG|[244]|DEBUG|@@@@ buildSObject referenceType objName : User
11:06:54.90 (208621486)|USER_DEBUG|[264]|DEBUG|@@@@ buildSObject referenceType field.getName() inner : DelegatedApproverId
11:06:54.90 (208631891)|USER_DEBUG|[265]|DEBUG|@@@@ buildSObject referenceType inner : Group
11:06:54.90 (208698739)|USER_DEBUG|[83]|DEBUG|@@@@ createSObject objectName : Group
11:06:54.90 (208714328)|USER_DEBUG|[68]|DEBUG|@@@@ init objectName : Group

Does anyone know why the reference Tye for DelegatedApproverId is Group when I apparently have to supply a UserId??

Thanks
Hi guys,

I am doing analysis concerning the feasibility of using lightning components within the partner community builder. My client wants to get some questions answered before moving on with the implementation.

I have set up a few custom components and have added them to the community builder with no issues. But i have hit a brick wall and I am hoping that there is a way around this.

Is there a way for components to communicate with each other within an envoronment like the community builder? Imagine a situation where a component can trigger an event that will be handled by other components. This is very important for navigational purposes. If applications were allowed within the community builder, wrapping the components in an application and using the an application event would be an option.

Any ideas on how to proceed here? Thanks
Hi there,

having problems get a reference to my application event. I get the error above showing that my application is undefined. According to the docs I get do this:

var lookupEvt = $A.get("e.c:lookup");
        lookupEvt.setParams({ 
            lookupTyp: sender,
            searchOption: searchOption,
            selectedEmailAddresses:selectedEmailAddresses
        });
        lookupEvt.fire();

my event is called lookup.evt and looks like this:

<aura:event type="APPLICATION">
    <aura:attribute name="lookupTyp" type="String" />
    <aura:attribute name="searchOption" type="String" />
    <aura:attribute name="selectedEmailAddresses" type="String" />
</aura:event>

I register my event in another component like this:

<aura:registerEvent name="lookup" type="c:lookup" />

Component events work fine but I need to use application events because a couple of different components should be able to trigger and handle these events.

Any ideas on how to overcome this problem?




I have used component events and they work perfectly well. But I need 
Hi all,

I am working my way through the integration wookbook. The basic scenerio is, the application is written using spring mvc and hosted in heroku. One way integration from salesforce via REST API works fine. Now we want the app on heroku to integrate with salesforce an be able to update our data model. For this we need to enable OAuth so the heroku app can authenticate remotely before accessing data on Salesforce (Tutorial 3 in the wookbook).

At this step, I get the following error


org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 30 in XML document from class path resource [applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 30; columnNumber: 16; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'fss:oauth'.

I have found a couple of resources online which try to explain this scenario and offer possible solutions 

http://stackoverflow.com/questions/8711186/the-matching-wildcard-is-strict-but-no-declaration-can-be-found-for-element-fs

There is this explaination and solution that makes absolute sense

https://github.com/forcedotcom/java-sdk/issues/31

Basically that the xsd file in which "fss:oauth" should be defined is missing which is true, because the xsi:schemaLocation in the application.xml http://media.developerforce.com/schema/force-springsecurity-1.3.xsd gives me this error.

<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>CD73BCF1560A19F3</RequestId>
<HostId>
4m6ilf2nj4XemWlWJBH5ZYh54tJkHN5LGJjhvKBAlouuz3eJQEorMf9RVje52h7agHRygeoPed0=
</HostId>
</Error>

This URL in the xsi:schemaLocation http://www.salesforce.com/schema/springsecurity also points to a path that is no longer available

I tried this xsd file http://force-spring.herokuapp.com/force-springsecurity-1.2.xsd hosted on git which seems to have the right definition for fss:oauth. But this didn't help.
I have tried all the other suggested workarounds such as modifying my pom.xml file and nothing has helped. I am stuck at this point. I even destroyed and recreated my project from scratch while trying various solutions and I get stuck at thesame spot.

I am not at all versed with the Spring MVC framework but I have read enough to understand what application.xml and pom.xml do. Any more insights on this issue will be highly appreciated.

Thanks
Hi everyone,

I can't send emails from my developer org. I have tried on two separate dev orgs and everytime I look in the System debug logs, all I see is EMAIL_QUEUE. Why are the emails queued indefinitely?

I have also tried the following code snippet :

Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
    String[] toAddresses = new String[] {'vnegi@salesforce.com'};
    mail.setToAddresses(toAddresses);
    mail.setSubject('Apex Email TEST');
    mail.setPlainTextBody('The Apex Test is finished processing');
    List<Messaging.SendEmailResult> sendRes = Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail }, true); 

from https://help.salesforce.com/apex/HTViewSolution?id=000171487&language=en_US 

and the emails are still just queued.  Email deliveribility is set to "All Emails"

I have been stuck at this point for a few days and will appreciate any suggestions on what could be wrong. 

Thanks
Hi All,

I have experience some very strange behaviour. I have created an object-specific action and added it to the Lead page layout. On the chatter feed / publisher i can see that button and also on SF1 as intended. 

The problem is, when I create a lead, it gets converted immediately. The user does not click the action to convert, the lead just gets converted. The standard button is not on the page. The lead convert action calls a Visualforce page to perform the conversion. When I remove the lead convert action from the layout, the lead does not get converted immediately when it is created.

I am just wondering if anyone has observed this behaviour before or has any idea where it might be coming from. I have observed this on two separate unrelated Orgs and haven't been able to figure it out yet. 

Thanks 

Terence
HI All,
i am attaching files to an email that I send out form Apex code. I was reading the documentation of email file size limits and came across very conflicting statements. In the help section it is clearly written

"The size limit for multiple files attached to the same email is 25 MB, with a maximum size of 5 MB per file."
(https://help.salesforce.com/apex/HTViewHelpDoc?id=collab_files_size_limits.htm)

But then I also find this in a couple of places

"The max email message size for a complete email message including attachments is 10MB"
(https://developer.salesforce.com/page/Force.com_Email_Services_Size_Limitations)

"Email Services: Maximum Size of Email Message (Body and Attachments):10MB"
"Email services reject email messages and notify the sender if the email (combined body text, body HTML, and attachments) exceeds approximately 10 MB (varies depending on language and character set)."
(https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_gov_limits.htm)
(https://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#CSHID=apex_classes_email_inbound_what_is.htm|StartTopic=Content%2Fapex_classes_email_inbound_what_is.htm|SkinName=webhelp)

My question is quite simple ... What limit should I care about if I intend to send attachments through email directly from the controller?
 Problem: In the email template, i am using a component which expects the account Id. This is assigned to a property on the Controller. The account Id never gets passed to the controller. On the UI "Set Test and Verify Merge Fields" everything works perfectly fine.

Template
<messaging:emailTemplate subject="Quote" recipientType="Contact" relatedToType="Account">
<messaging:htmlEmailBody >
    <html>
    <body>
        <c:KoreanTest acct="{!relatedTo.Id}" />
    </body>
    </html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>

Component:
<apex:component controller="CtrKoreanTest" access="global">
<apex:attribute name="acct" type="String" description="Placeholder" assignTo="{!acctId}"/>
<table width="100%">
    <tr>
        <td class="headelements" ><div style="width: 200px;"><img src="{!URLFOR($Resource.Yogiyo_Logo)}" /></div></td>
        <td class="headelements" style="font-weight: bold; font-size: 17px;">요기요 서비스 등록 신청서</td>
        <td class="headelements">
            <div><span style="width: 10px;">담당자</span> : {!accountWrapper.Name} </div>
            <div><span style="width: 10px;">연락처</span> : {!accountWrapper.Company_Number__c}</div>
        </td>
    </tr>
</table>
<br />
</apex:component>

Controller:
public without sharing class CtrKoreanTest {
    public String acctId { get; set; }
    public CtrKoreanTest() {
    }

   public ClsAccountWrapper getAccountWrapper(){
        ClsAccountWrapper accountWrapper;
        if(acctId != null){
            acct = [SELECT Id, Name, Company_Number__c FROM Account WHERE Id =: acctId];
            accountWrapper = new ClsAccountWrapper(acct);
        }
        return accountWrapper;
    }
}

ClsAccountWrapper is a simple wrapper class

I will very much appreciate any ideas what to look for. 
Thanks
Hi all,
when i modify an existing visualforce email template, the changes are applied on the UI. Now if i query for email template like this 

SELECT id, Body, HtmlValue, Name, DeveloperName, LastUsedDate, CreatedDate, Markup, ApiVersion FROM EmailTemplate WHERE Name = 'QuoteVFTemplate'

the HtmlValue returned is unchanged. However the Markup reflects the changes I made to the template on the UI.

Can someone please tell me why this could be happening or point me to  the right resource? Haven't been able to find any documentation around caching of Email templates.

The use case is, I want to get the HtmlValue of the template and render it on a Visualforce Page as pdf.

Thank you
Hi all,
I am sending a single email from Apex code. Although I do not have any erros, the email doesn't get sent. As you can see from the code snippet, it is pretty uncomplicated. Wanted to do a test send before I get to the complicated stuff. There are not error messages but the email doesn't get sent. Any ideas???

Messaging.Singleemailmessage mail = new Messaging.Singleemailmessage();
mail.setToAddresses(new String[] {'terence1122@gmail.com'});
mail.setReplyTo('noreply@privatebudget.com');
mail.setSenderDisplayName('Private Budget App');
mail.setSubject('Private Budget records for ' + Date.today().month() + ' ' + Date.today().year());
mail.setBccSender(false);
mail.setUseSignature(false);
mail.setPlainTextBody('This is a test');
system.debug('@@@@ sendEmail - mail : ' + mail);
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });

The sytem debug produces the following
@@@@ sendEmail - mail : Messaging.SingleEmailMessage[getBccAddresses=null;getCcAddresses=null;getCharset=null;getDocumentAttachments=null;getFileAttachments=null;getHtmlBody=null;getInReplyTo=null;getOrgWideEmailAddressId=null;getPlainTextBody=This is a test;getReferences=null;getTargetObjectId=null;getTemplateId=null;getToAddresses=(terence1122@gmail.com);getWhatId=null;isUserMail=false;]

I am working on the dev org and executing the class which sends the mail from execute anonymous. 
Thanks
In Salesforce CRM Content, when you click on a document added to the library, you can preview the document. You can also open up comments, versions etc. in this small preview window.

Where are the comments stored? I have looked at every single standard object definition and I can't find where they are stored. For example tags can be retrieved from the TagCsv field on the ContentVersion object which i also needed to to, but I cannot find the comments anywhere.

So how can I programmatically access comments added to a document directly in content????

thank you 
HI All,
i am attaching files to an email that I send out form Apex code. I was reading the documentation of email file size limits and came across very conflicting statements. In the help section it is clearly written

"The size limit for multiple files attached to the same email is 25 MB, with a maximum size of 5 MB per file."
(https://help.salesforce.com/apex/HTViewHelpDoc?id=collab_files_size_limits.htm)

But then I also find this in a couple of places

"The max email message size for a complete email message including attachments is 10MB"
(https://developer.salesforce.com/page/Force.com_Email_Services_Size_Limitations)

"Email Services: Maximum Size of Email Message (Body and Attachments):10MB"
"Email services reject email messages and notify the sender if the email (combined body text, body HTML, and attachments) exceeds approximately 10 MB (varies depending on language and character set)."
(https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_gov_limits.htm)
(https://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#CSHID=apex_classes_email_inbound_what_is.htm|StartTopic=Content%2Fapex_classes_email_inbound_what_is.htm|SkinName=webhelp)

My question is quite simple ... What limit should I care about if I intend to send attachments through email directly from the controller?
I am using the free developer edition.
And, I cannot enable the **Site.com Publisher User** option under My Profile Advance Setting.

I go this error when I tried to enable Site.com and Publisher User following the instruction from here https://developer.salesforce.com/page/Site.com:

No Site.com Contributor User Licenses Available
There are no Site.com Contributor User Licenses available. If you wish to add Site.com Contributor User Licenses, please <a href="/cases/logabug.jsp?00N00000000z2xc=Site.com+Contributor+License&type=Request&subject=Add+Site.com+Contributor+Licenses&retURL=%2Fhome%2Fhome.jsp&successURL=%2Fhome%2Fhome.jsp">submit a case</a>. A salesforce.com representative will contact you. 


Could you please tell me what this error means?

Thanks
 
Hi there,

having problems get a reference to my application event. I get the error above showing that my application is undefined. According to the docs I get do this:

var lookupEvt = $A.get("e.c:lookup");
        lookupEvt.setParams({ 
            lookupTyp: sender,
            searchOption: searchOption,
            selectedEmailAddresses:selectedEmailAddresses
        });
        lookupEvt.fire();

my event is called lookup.evt and looks like this:

<aura:event type="APPLICATION">
    <aura:attribute name="lookupTyp" type="String" />
    <aura:attribute name="searchOption" type="String" />
    <aura:attribute name="selectedEmailAddresses" type="String" />
</aura:event>

I register my event in another component like this:

<aura:registerEvent name="lookup" type="c:lookup" />

Component events work fine but I need to use application events because a couple of different components should be able to trigger and handle these events.

Any ideas on how to overcome this problem?




I have used component events and they work perfectly well. But I need 
Hi everyone,

I can't send emails from my developer org. I have tried on two separate dev orgs and everytime I look in the System debug logs, all I see is EMAIL_QUEUE. Why are the emails queued indefinitely?

I have also tried the following code snippet :

Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
    String[] toAddresses = new String[] {'vnegi@salesforce.com'};
    mail.setToAddresses(toAddresses);
    mail.setSubject('Apex Email TEST');
    mail.setPlainTextBody('The Apex Test is finished processing');
    List<Messaging.SendEmailResult> sendRes = Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail }, true); 

from https://help.salesforce.com/apex/HTViewSolution?id=000171487&language=en_US 

and the emails are still just queued.  Email deliveribility is set to "All Emails"

I have been stuck at this point for a few days and will appreciate any suggestions on what could be wrong. 

Thanks
HI All,
i am attaching files to an email that I send out form Apex code. I was reading the documentation of email file size limits and came across very conflicting statements. In the help section it is clearly written

"The size limit for multiple files attached to the same email is 25 MB, with a maximum size of 5 MB per file."
(https://help.salesforce.com/apex/HTViewHelpDoc?id=collab_files_size_limits.htm)

But then I also find this in a couple of places

"The max email message size for a complete email message including attachments is 10MB"
(https://developer.salesforce.com/page/Force.com_Email_Services_Size_Limitations)

"Email Services: Maximum Size of Email Message (Body and Attachments):10MB"
"Email services reject email messages and notify the sender if the email (combined body text, body HTML, and attachments) exceeds approximately 10 MB (varies depending on language and character set)."
(https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_gov_limits.htm)
(https://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#CSHID=apex_classes_email_inbound_what_is.htm|StartTopic=Content%2Fapex_classes_email_inbound_what_is.htm|SkinName=webhelp)

My question is quite simple ... What limit should I care about if I intend to send attachments through email directly from the controller?
I have two objects parent__c and Teacher__c . There is no relationship between them .no materdetail no lookup . 
only name fields in both parent__c and teacher__c will be treated as common , because we will manual enter the name field . 
Parent fields: name(text )
, teacher_expertise (text)
Teacher Name (text)
Teacher fields :
- name (text)
expertise (picklist) 
Teacher_name( Text Fields)
I would like to update teacher_expertise and Teacher_name  field on parent objects :
Once we update fields on Teacher__c it should update Parent__c.
how can we use maps in this . 
Please help . Urgent
Thanks 
Hi all,
when i modify an existing visualforce email template, the changes are applied on the UI. Now if i query for email template like this 

SELECT id, Body, HtmlValue, Name, DeveloperName, LastUsedDate, CreatedDate, Markup, ApiVersion FROM EmailTemplate WHERE Name = 'QuoteVFTemplate'

the HtmlValue returned is unchanged. However the Markup reflects the changes I made to the template on the UI.

Can someone please tell me why this could be happening or point me to  the right resource? Haven't been able to find any documentation around caching of Email templates.

The use case is, I want to get the HtmlValue of the template and render it on a Visualforce Page as pdf.

Thank you
Hi all,
I am sending a single email from Apex code. Although I do not have any erros, the email doesn't get sent. As you can see from the code snippet, it is pretty uncomplicated. Wanted to do a test send before I get to the complicated stuff. There are not error messages but the email doesn't get sent. Any ideas???

Messaging.Singleemailmessage mail = new Messaging.Singleemailmessage();
mail.setToAddresses(new String[] {'terence1122@gmail.com'});
mail.setReplyTo('noreply@privatebudget.com');
mail.setSenderDisplayName('Private Budget App');
mail.setSubject('Private Budget records for ' + Date.today().month() + ' ' + Date.today().year());
mail.setBccSender(false);
mail.setUseSignature(false);
mail.setPlainTextBody('This is a test');
system.debug('@@@@ sendEmail - mail : ' + mail);
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });

The sytem debug produces the following
@@@@ sendEmail - mail : Messaging.SingleEmailMessage[getBccAddresses=null;getCcAddresses=null;getCharset=null;getDocumentAttachments=null;getFileAttachments=null;getHtmlBody=null;getInReplyTo=null;getOrgWideEmailAddressId=null;getPlainTextBody=This is a test;getReferences=null;getTargetObjectId=null;getTemplateId=null;getToAddresses=(terence1122@gmail.com);getWhatId=null;isUserMail=false;]

I am working on the dev org and executing the class which sends the mail from execute anonymous. 
Thanks
In Salesforce CRM Content, when you click on a document added to the library, you can preview the document. You can also open up comments, versions etc. in this small preview window.

Where are the comments stored? I have looked at every single standard object definition and I can't find where they are stored. For example tags can be retrieved from the TagCsv field on the ContentVersion object which i also needed to to, but I cannot find the comments anywhere.

So how can I programmatically access comments added to a document directly in content????

thank you