• Neil Kim
  • NEWBIE
  • 60 Points
  • Member since 2016
  • Consultant
  • Clovis

  • Chatter
    Feed
  • 0
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 50
    Questions
  • 41
    Replies
Hi there!
We are now trying to implement messaging addon for sending contract form after contract is activated.

We'd like to send link where customer can download contract at with limited access time.

I found that we can create public link from Content object.
However,
1. Can we make this public link avaliable only 12 hours?
2. Another options is, make signed PDF contract as image file and then, send it as attachement.

1 or 2, is there any good way to do it?
Hi all!

What I tried,
There is site guest user.
when guset user doing something, post chatter on account record.

In this case, 'Guest users are not permitted to perform this operation.' occurs, becuase guest user cannot created chatter feed.

So, I created another trigger that is fired from guest user's activity.
I put the code posting chatter feed in there, becuase Trigger runs as System Mode.

However,,, the same error occurs after modifying process.

Why is this happen and is there any workaround?

Thanks.
Hi all!

I wonder what it is, 'Web service API' add-on.
We can purchase it through AE on our Professional Edition org.

What I want to know is,
'it makes all Apex code or developing on PE?'
or
just for data migration?

I saw this article below.
https://help.salesforce.com/articleView?id=000005140&type=1

However, I hope hearing scope of this add-on from someone who has experience using it.

Thanks!
 
Hi all! I searched many articles for a while. However, It's hard to move to there from previous Mavensmate situation.

Like what all of you already know, Mavensmate can
1. Easily getting all files from org.
2. Real-time code sync from local workspace to cloud platform.
3. Easy deployment from sandbox to product.

Can I get the benefits above at VS Code with the same approach?
I tried using it for getting all source files from cloud to local workspace, but it was hard to do that.. I cannot find login function to sandox..
Looks like only Salesfore DX org can be authorized.

Any nice article or guidance?
Thanks in advance.
Hi all.
I'm totally newbie at using Oauth2.0. Please help me kindly.

Before now, I've used Site for making public api.
However, this time, I need to consider security. So, after several hours study, I'm trying to use Connected App/Oauth2.0.
Using connectedApp(CId, CSecret) and username/password, I can get Access Token.

The point that I cannot understand now is 'Valid time of Access Token'.
Is it permanent for the same connected App and consumer?
or it is changed everytime it is issued?

1. Everytime calling api, get Access Token using CId, CSecret, username, password.
2. Using static attr, store access token and then, calling api with access token.
    Add logic : if static sttr is empty, get access token again.

Is 1 or 2 right approach? or any other things I need to consider?

Thanks!
Hi all.
Please help about the issue.
I have onComplete on actionfunction called by button, and called function is another actionfunction that return PageReference for moving to next page.

When I click button at the first it doesn't move to next page, after then, I click it again, it works, moving to next Page.
Why is this happening? Code below.
 
<apex:form>

<Button class="col-mx-6  col-md-6" onclick="moveT()">Go to Next Page</Button>

<apex:actionFunction name="movemove" action="{!saveParams}" reRender="panel" oncomplete="moveToNext()">
    <apex:param name="Param1" assignTo="{!Param1}" value=""/>
    <apex:param name="Param2" assignTo="{!Param2}" value=""/>
    <apex:param name="Param3" assignTo="{!Param3}" value=""/>
    <apex:param name="Param4" assignTo="{!Param4}" value=""/>
</apex:actionFunction>
<apex:actionFunction name="moveToPrevious" action="{!moveTo0}"/>
<apex:actionFunction name="moveToNext" action="{!moveTo2}"/>

</apex:form>




public void saveParams(){
    // some data modification
    // No Page related action.
}

public PageReference moveTo2(){
        PageReference pg;
        pg = Page.VFPage2;

        return pg;
}
Thanks in advance!
 
Hi all!
I hava a controller having Remote action and normal function called by actionfunction.
In my VF, I call actionfunction first, and during this action, I save some value to static variable in Controller.
After then, Call remoteaction from VF and want to use the static variable, but it returns null.

I will show you my code
global class TestExtension {

    static String oId{get; set;}

   public PageReference setoId(){ // called first
        // some action
        Oid = something
        System.debug('oId : ' + Oid); // It shows me value as expected

        return null;
    }

    @RemoteAction        
    global static String bookingInsert(String context){
        System.debug('id : ' + oId); // it shows me null
        return oId;
   }
}

Any advise for resolving this problem?

Thanks!
 
Hi everyone.
I have some issue. Please help me.
I'm confused about reRender and setRedirect.
I saw several another post, but cannot understand their resolution.

First of all, here is code below
VF
<apex:form id="myform">
            <apex:actionFunction name="moveTo1" action="{!moveTo1}" reRender="myform" status="myStatus"> // reRender is first issue
               <apex:param name="firstparam" assignTo="{!currentC}" value=""/>
               <apex:param name="secondparam" assignTo="{!currentD}" value=""/>
               <apex:param name="thirdparam" assignTo="{!currentT}" value=""/>
            </apex:actionFunction>
            <script>
               function move(){
              moveTo1(document.getElementById('aaa').value, document.getElementById('bbb').value, document.getElementById('ccc').value);
            }
            </script>
         </apex:form>
Controller
public PageReference moveTo1(){
        PageReference pg;
        pg = Page.VFpage1;
        pg.setRedirect(false); // Here is another Problem,

        return pg;
    }


Problem is
with rerender + setRedirect(false) = first click no response, second click show error(session invalid)
with rerender + setRedirect(True) = page move normally, variable empty. - Controller reloaded?
without rerender + setRedirect(false) = page move normally, variable empty. - actionfunction cannot catch params?
without rerender + setRedirect(True) = page move normally, variable empty. - actionfunction cannot catch params?

So, how can I get normal page moving + preserve variables?

Please help!
Hi all.
I have jquery-html code that work well out of SFDC.
Now I'm trying to move it to SFDC VF.

Currently, without action, jquery works well. However, when I add Actionfunction, it stoped.
I will show you code.

Jquery
<script> 
// Slide Up
$(document).ready(function(){
    $("#btn2").click(function(){
        $("#last").slideUp("slow");
      $("#end").show();
       });
  });
</script>

VF
<apex:form>
	<apex:actionFunction name="runSave" action="{!saveResponse}"/>
  </apex:form>
  	<button class="btn	btn-primary	btn-block" id="btn2" onclick="runSave()"> Submit </button>

I cannot use Command Button because, Command Button does not accept jquery using id("btn2").
When I use commandbutton instead of button, it doesn't work.

But I need to run method in Controller, so I tried to use actionfunction.
However, when I run above code, slide up work at the first time and during sliding, page reloaded and slidnig cannot be completed.
I need to complete sliding and stop at div section sliding up completed.

Anybody help me approach?

Thanks in advance.
 
Hi all.
I'm working for pass variable from VF to another VF.

Here is my code.
First VF
<apex:form>
<apex:actionFunction name="setParam" action="{!passParam}" reRender="resultPanel" status="myStatus">
	<apex:param name="firstparam" assignTo="{!s1}" value=""/>
</apex:actionFunction>
</apex:form>
First VF jquery
$(".select")
    .click(function(event) {
    	alert($(this).val()),
    	setParam($(this).val());
    })
    ;
and then, I have <a> tag for moving to next page like this
<a href="/apex/page2"><div  class="col-xs-6   col-md-4   text-center"><b> Next ></b></div ></a>

Finally, second VF
<script>
    window.onload = function(){
    	alert({!s1});
    	
    }
</script>


However, currently variable s1 is not passed.
alert show me empty box.

Could you please guide me about the issue?

Thanks in advance.
 
Hi all! It's really general question about develop VF in SFDC platform.

Nowadays, I've worked with web designer and she is not familiar with SFDC.
In this situation, what we do together is, she write down font-end html/css/a little javascript code, and I take it and add Data integration work with SDFC.

The problem is,
I copy all code from html file she has done, and then paste to VF, of course, I need to adjust ref information with Static Resource.
But, many css occur problem like, align:center doesn't work background-color doesn't work something like that.

Is there any reason about it and easy solution?

Thanks in advance.
 
Hi all!
I'm now trying to embed visualforce page to external website(our shoppingmall).
Of course, I use force.com site and use this visualforce page that I want to show.

In this situation, I want to embed this force.com site to our shopping mall page.
When I try to open the URL at browser directly, it works fine.
However, when I embed this URL through Iframe like (src="force.com site URL"), it doesn't work.
There is only 1 grey, empty box.

Anybody can help me?

 
Hi exports. I encountered this error and have trouble with performance tuning.

I tried asyncronous approach, but Apex CPU time limit exceeded occurs continuously.
Anybody can make it more efficient?

Here is code and size of each Lists from static method is about 15,000.
Please help.
 
static List<Schedule__c> getScheduleList(){
		return [SELECT ID, Opportunity__c, StartTime__c FROM Schedule__c WHERE Result__c = 'Success' ORDER BY Opportunity__c];
	}

	global Database.QueryLocator start(Database.BatchableContext BC) {
		query = 'SELECT ID FROM CASE';
		return Database.getQueryLocator(query);
	}

   	global void execute(Database.BatchableContext BC, List<sObject> scope) {
   		List<Opportunity> allopps = getOppList();
   		List<Schedule__c> schedules = getScheduleList();

		List<Schedule__c> filtered = new List<Schedule__c>();
        Datetime dt;
        Boolean check;
        Boolean status;

        for ( Opportunity opp : allopps ){
       		dt = null;
 			check = false;
 			status = false;
       		for (Schedule__c schedule : schedules ){	
   				if( check == false && status == true )
   					break;

   				if( schedule.Opportunity__c == opp.id ){
   					check = true;
       				filtered.add(schedule);
       				if( dt == null || schedule.StartTime__c < dt)
       					dt = schedule.StartTime__c;

       				i++;
       			}
       			else if( check == true && status == false){
       				check = false;
       				status = true;
       			}
       		}

       		if( filtered.size() >= 1){
       			opp.SuccessDate__c = dt;
       			opp.StageName = 'Success';
       		}
       		else if( filtered.size() == 0 && opp.StageName == 'Success'){
				opp.SuccessDate__c = null;
				opp.StageName = 'Initial Stage';
       		}
        }

        System.debug('schedule size : ' + schedules.size());
        System.debug('size : ' + allopps.size() + ' count : ' + i);
        /*
		try{
			update allopps;
        }catch( Exception e){
       		System.debug('Error : ' + e.getMessage());
        }
        */
	}

Thanks in advance.
Hi!
I wonder is there any way to do it with declaritive or programmatic way, whatever.

We want to create Input field with Salesforce Paltform UI or VF.
This field must have features below.
1. Text can be inserted.
2. Image can be inserted.
3. Table can be inserted.
1-3 can be inserted in the 1 field at the same time.

Is there any way? Of course, I know that Rich Text Field can do 1, 2. However we need 3, Table.

Please help!
 
Hi all.

I'm now using Sublime Text3 with MavensMate and heard that there is eclipse force.com IDE.
If there are some other develop tools, could you please let me know and suggest me what you think the best among them.

Thanks in advance,
Hi all.
I wonder is there any way to embed DOC(MS Word) editor in Community.

What we want to do is that
1. Community user click button in Community.
2. DOC editor is opened and the initial contents is in there.
3. Community user modify initial content with their own information
4. Save and it is saved in SFDC DB.

Is there any way to do this?
Hi experts,

Now, I'd like to pop up error message in LEX with super simple text.
However, want to show message with Full-Lightning-Native component.

How can I make this Process?
If you know any article or post about this approach, please share with me.

Thanks in advance
Hi all. I found all related article on this forum, but there is no answer for this issue captured below.
User-added image

I sorted 'My Top Volunteer Organizations' Report on grouped level only.
Didn't sort on any non-grouped level.
User-added image

How do I resolve this issue?
it looks like even system error or wrong error msg.
Hi All.
I'm now trying to make method that is callable from outside of Salesforce.

The scenario is :
1. There is our website and it has customer's info.
2. Everytime, customer's info is changed, website call Salesforce's method.
3. This method update salesforce record details.

How can I make this kind of method?
I saw 'Webservice' concept on Salesforce Developer Guide, However, there is no sample code based on scenario.
Hi All.

I have a Visual Workflow and it create records from user key-in values(Quetions & Answers).

It works perfect in Android, but in IOS(I tested in IPAD PRO), everytime I touch question for answering(Pick-list), cursor moves to the top of page.
So, everytime I have to move to the next question after touching for answering prior question.

Is there any workaround?
I reported it to SFDC Support and they said to me that they cannot fix the issue at this momoent.

Please share your expertise.

Thanks in advance.
 
Hi all. I found all related article on this forum, but there is no answer for this issue captured below.
User-added image

I sorted 'My Top Volunteer Organizations' Report on grouped level only.
Didn't sort on any non-grouped level.
User-added image

How do I resolve this issue?
it looks like even system error or wrong error msg.
Hi.
I have big Visualforce page, and now I tried to use insertRow / insertCell to make dynamic table.

First of all, I tested it on test table.
I made button that call make row function.

However, whenever I click button, the new row appears, and dissapear soon. for 0.2~0.3sec.

Why do this dissapear? How do I avoid it?

Please help.
Hi.
I tried to 'deploy to server' from Eclipse, and then validate, the error is occured.
'No package.xml found'.

Can anyone help me to solve this issue?
This deployment is from Sandbox to Product.

Please help.
 
Hi all!

I wonder what it is, 'Web service API' add-on.
We can purchase it through AE on our Professional Edition org.

What I want to know is,
'it makes all Apex code or developing on PE?'
or
just for data migration?

I saw this article below.
https://help.salesforce.com/articleView?id=000005140&type=1

However, I hope hearing scope of this add-on from someone who has experience using it.

Thanks!
 
Hi all! I searched many articles for a while. However, It's hard to move to there from previous Mavensmate situation.

Like what all of you already know, Mavensmate can
1. Easily getting all files from org.
2. Real-time code sync from local workspace to cloud platform.
3. Easy deployment from sandbox to product.

Can I get the benefits above at VS Code with the same approach?
I tried using it for getting all source files from cloud to local workspace, but it was hard to do that.. I cannot find login function to sandox..
Looks like only Salesfore DX org can be authorized.

Any nice article or guidance?
Thanks in advance.
Hi all!
I hava a controller having Remote action and normal function called by actionfunction.
In my VF, I call actionfunction first, and during this action, I save some value to static variable in Controller.
After then, Call remoteaction from VF and want to use the static variable, but it returns null.

I will show you my code
global class TestExtension {

    static String oId{get; set;}

   public PageReference setoId(){ // called first
        // some action
        Oid = something
        System.debug('oId : ' + Oid); // It shows me value as expected

        return null;
    }

    @RemoteAction        
    global static String bookingInsert(String context){
        System.debug('id : ' + oId); // it shows me null
        return oId;
   }
}

Any advise for resolving this problem?

Thanks!
 
Hi everyone.
I have some issue. Please help me.
I'm confused about reRender and setRedirect.
I saw several another post, but cannot understand their resolution.

First of all, here is code below
VF
<apex:form id="myform">
            <apex:actionFunction name="moveTo1" action="{!moveTo1}" reRender="myform" status="myStatus"> // reRender is first issue
               <apex:param name="firstparam" assignTo="{!currentC}" value=""/>
               <apex:param name="secondparam" assignTo="{!currentD}" value=""/>
               <apex:param name="thirdparam" assignTo="{!currentT}" value=""/>
            </apex:actionFunction>
            <script>
               function move(){
              moveTo1(document.getElementById('aaa').value, document.getElementById('bbb').value, document.getElementById('ccc').value);
            }
            </script>
         </apex:form>
Controller
public PageReference moveTo1(){
        PageReference pg;
        pg = Page.VFpage1;
        pg.setRedirect(false); // Here is another Problem,

        return pg;
    }


Problem is
with rerender + setRedirect(false) = first click no response, second click show error(session invalid)
with rerender + setRedirect(True) = page move normally, variable empty. - Controller reloaded?
without rerender + setRedirect(false) = page move normally, variable empty. - actionfunction cannot catch params?
without rerender + setRedirect(True) = page move normally, variable empty. - actionfunction cannot catch params?

So, how can I get normal page moving + preserve variables?

Please help!
Hi all! It's really general question about develop VF in SFDC platform.

Nowadays, I've worked with web designer and she is not familiar with SFDC.
In this situation, what we do together is, she write down font-end html/css/a little javascript code, and I take it and add Data integration work with SDFC.

The problem is,
I copy all code from html file she has done, and then paste to VF, of course, I need to adjust ref information with Static Resource.
But, many css occur problem like, align:center doesn't work background-color doesn't work something like that.

Is there any reason about it and easy solution?

Thanks in advance.
 
Hi all!
I'm now trying to embed visualforce page to external website(our shoppingmall).
Of course, I use force.com site and use this visualforce page that I want to show.

In this situation, I want to embed this force.com site to our shopping mall page.
When I try to open the URL at browser directly, it works fine.
However, when I embed this URL through Iframe like (src="force.com site URL"), it doesn't work.
There is only 1 grey, empty box.

Anybody can help me?

 
Hi exports. I encountered this error and have trouble with performance tuning.

I tried asyncronous approach, but Apex CPU time limit exceeded occurs continuously.
Anybody can make it more efficient?

Here is code and size of each Lists from static method is about 15,000.
Please help.
 
static List<Schedule__c> getScheduleList(){
		return [SELECT ID, Opportunity__c, StartTime__c FROM Schedule__c WHERE Result__c = 'Success' ORDER BY Opportunity__c];
	}

	global Database.QueryLocator start(Database.BatchableContext BC) {
		query = 'SELECT ID FROM CASE';
		return Database.getQueryLocator(query);
	}

   	global void execute(Database.BatchableContext BC, List<sObject> scope) {
   		List<Opportunity> allopps = getOppList();
   		List<Schedule__c> schedules = getScheduleList();

		List<Schedule__c> filtered = new List<Schedule__c>();
        Datetime dt;
        Boolean check;
        Boolean status;

        for ( Opportunity opp : allopps ){
       		dt = null;
 			check = false;
 			status = false;
       		for (Schedule__c schedule : schedules ){	
   				if( check == false && status == true )
   					break;

   				if( schedule.Opportunity__c == opp.id ){
   					check = true;
       				filtered.add(schedule);
       				if( dt == null || schedule.StartTime__c < dt)
       					dt = schedule.StartTime__c;

       				i++;
       			}
       			else if( check == true && status == false){
       				check = false;
       				status = true;
       			}
       		}

       		if( filtered.size() >= 1){
       			opp.SuccessDate__c = dt;
       			opp.StageName = 'Success';
       		}
       		else if( filtered.size() == 0 && opp.StageName == 'Success'){
				opp.SuccessDate__c = null;
				opp.StageName = 'Initial Stage';
       		}
        }

        System.debug('schedule size : ' + schedules.size());
        System.debug('size : ' + allopps.size() + ' count : ' + i);
        /*
		try{
			update allopps;
        }catch( Exception e){
       		System.debug('Error : ' + e.getMessage());
        }
        */
	}

Thanks in advance.
Hi!
I wonder is there any way to do it with declaritive or programmatic way, whatever.

We want to create Input field with Salesforce Paltform UI or VF.
This field must have features below.
1. Text can be inserted.
2. Image can be inserted.
3. Table can be inserted.
1-3 can be inserted in the 1 field at the same time.

Is there any way? Of course, I know that Rich Text Field can do 1, 2. However we need 3, Table.

Please help!
 
Hi all.

I'm now using Sublime Text3 with MavensMate and heard that there is eclipse force.com IDE.
If there are some other develop tools, could you please let me know and suggest me what you think the best among them.

Thanks in advance,
Hi all.
I wonder is there any way to embed DOC(MS Word) editor in Community.

What we want to do is that
1. Community user click button in Community.
2. DOC editor is opened and the initial contents is in there.
3. Community user modify initial content with their own information
4. Save and it is saved in SFDC DB.

Is there any way to do this?
Hi all. I found all related article on this forum, but there is no answer for this issue captured below.
User-added image

I sorted 'My Top Volunteer Organizations' Report on grouped level only.
Didn't sort on any non-grouped level.
User-added image

How do I resolve this issue?
it looks like even system error or wrong error msg.
Hi!

I have update trigger on A object, and in my org, there are the other class that update A.

In  this case, I'd like to make new update trigger, and i'd like to invoke it only when user update A object manully.
Existing trigger update A but dosen't invoke new trigger.

Is it possible?
Hi! I have some trouble about debug log.

I tested some code  below.
 
System.debug('why is not shown2');
System.debug('size 1: ' + flowArr.size());
for( integer i = 0 ; i < flowArr.size() ; i ++ )
	System.debug('Mapping__c : ' + flowArr[i].Mapping__c);

for( integer i = 0 ; i < flow.size() ; i ++ )
	System.debug('Mapping__c2 : ' + flow[i].Mapping__c);

System.debug('why is not shown3');
List<integer> arr = new List<integer>();
//SYstem.debug('flow size : ' + flow.size());
for( integer i = 0 ; i < flow.size() ; i ++ ){
	for( integer j = 0 ; j < flowArr.size() ; j ++ ){
		if( flow[i].Mapping__c == flowArr[j].Mapping__c ){
			arr.add(i);
		}
	}
}

System.debug('why is not shown4');

This code is called by trigger.
and, in Developer Console, only 'why is not shown4' is appeared only.
'why is not shown2 and 3 is not appeared....

Is there any clue about it?
Because of it, I cannot do debuging..

Please help me.
Hi. It worked some hours ago. Suddenly it do abnormally..
Could you please check it for me? why is this happened?

Here is visualforce page form
<apex:page showHeader="true" sidebar="true" controller="Test">
	<apex:form id="fr1">
		<apex:inputTextarea id="text" value="{!text}" cols="4" style="width:100%; height:80px"/><br/>
		From : &nbsp;<apex:outputText value="+565656"/><br/>
		To : &nbsp;<apex:inputText id="to" value="{!to}" style="width:80%"/>
		<apex:commandButton onClick="{!sendSMS}" value="Send Message" immediate="false"/>
	</apex:form>
</apex:page>

and controller
public with sharing class Test {
	public TwilioTest() {}
	public String text {get; set;}
	public String to {get; set;}

	public void getsendSMS(){
		String ACCOUNT_SID = 'AAA';
		String AUTH_TOKEN = 'VVV';
		if( to != null ){ <------ what I added to avoid the error.
			String phone_to = '+82'+to.leftPad(1);

			TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

			Map<String,String> properties = new Map<String,String> {
		        'To'   => phone_to,
		        'From' => '+AAAA,
		        'Body' => text
			};

			TwilioMessage message = client.getAccount().getMessages().create(properties);	
		}
		
	}
}

When I loaded visualforce page, getsendSMS function is called right away.
I'm not click commandbutton..
For avoiding this error, I insert If statement...

Is there any clue?

Please help.