• kzmp
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 17
    Questions
  • 28
    Replies
Is it possible to create packaged app which I can white label to companies which can intern publish their own white-labeled app on the AppExchange?
So essentially I will create App A which I will sell to Awesome Company 1 and Awesome Company 2 and both of these companies will have the same version of App A on the AppExchange but branded for each company respectively?
  • September 30, 2019
  • Like
  • 0
I am following the steps here, Create an Authentication Provider for Google Drive (https://help.salesforce.com/articleView?id=admin_files_connect_google_auth.htm&type=5" target="_blank) to configure Files Connect with Google Drive. 
I noticed that the access type for the Authorize Endpoint Url is
access_type=offline
which means that Salesforce will get a session token and a refresh token after the Salesforce user authenticates with Google the first time. Salesforce will store the Refresh token and will use it later to automatically get new access tokens using the OAuth workflow.

The concern I have is that if Salesforce becomes compromised the Refresh Token will give access to the attackers to google drive as well. 
Can someone help me what is the mitigation to that risk? Is Salesforce encrypting the Refresh Tokens or how are the protecting them?
Separately can I change the access_type and always prompt the user to sign in with google which might be a little annoying but if my admin is obsessed about security it is a mitigation?

Thanks!
  • September 30, 2019
  • Like
  • 0
Hi,
I have a requirement to be able to send emails from a trigger through gmail. Does anybody know how to do that?
I have already setup Email sending through Gmail, however one of the limitations is that Workflows and Apex triggers send emails from Salesforce and not through gmail.

Thanks!
  • August 01, 2018
  • Like
  • 0

Hi,

I have a managed package which includes triggers and other bits of code which work with sObjects.

In my unit tests for the package I do inserts in say the Accounts sObject. But when a user who has customized the the Accounts sObject with validation rules tries to install my package he/she gets an error because the values my tests insert do not pass his/her validation rules.

 

Could you please advise of the best practices in this kind of situation.

 

Thanks,

Kzmp

  • July 06, 2012
  • Like
  • 0

Hi,

We need to be able to access the field names on a SalesForce page with javascript. For example when the user opens the Accounts page our javascript needs to be able to access the email field. When the user opens the Lead page our javascript needs to be able to access the email field on Leads.

 

Is there a way to detect what is the email's field id/name on Leads and Accounts and possibly the other SF pages.

 

Thanks,

Kzmp

  • March 16, 2011
  • Like
  • 0

Hi

This is more like two questions in one post.

We have a custom home page component on which we would like to use some AJAX to access external system (call an external web service) and Ajax to interacti with the SF database. And the javascript on that page must execute from the same domain as SF pages.

After a lot of struggling and trial and error. we figured out the following way:

1. Download the Connection.js API from SalesForce and upload it as a static resource.

2. Create a custom html home page component. Include the Connection.js <script type="text/javascript" src="/resource/QAS_NA_TEST__Connection"> write your html and javascript logic there and save it.

 

So far soo good the only problem is how would the Connection.js salesforce API get its session. After a lot of trial and error we decided to:

 

3. Create a custom links home page component. The custom link inside is is an "execute javascript" link and it has the following component:

 window.sessionIdTest = '{!GETSESSIONID()}';

 

4. Add an onload javascript event handler in the home page html component in step 1 above with the following body:

 

 var link = $("a:contains('Test link')");            link.attr('onclick',link.attr('href').replace('javascript&colon;','').replace('%28','(').replace('%29',')'));            link.trigger('click');            sforce.connection.sessionId = window.sessionIdTest; 

 

The idea is that when the home page loads our html home page component finds the custom link and clicks it. The custom link in turn sets the SF session to a global variable then the Home page component picks up that variable and initializes SF Ajax.

In that way we can call external Web services from our custom html home page component and we can access the SF database which is what we would like to achieve.

 

Finally the questions:

1.Would anybody suggest anything simpler to do this?

2. Would SalesForce certify this if it is going to be a part of a managed package sold to thid party customers?

 

Please note that making a VF page and adding that in an iframe to the custom html component is not a solution for us because it is absolutely essential for us that our javascript executes in the same domain as SF.

 

Thanks,

Kzmp

  • March 14, 2011
  • Like
  • 0

Hi,

We have designed 1 component which displays some basic informatin to the user let say emails.

We have a VF page on which we would like to show as many components of those as the number of emails that we have.

 

The page controller knows the number of emails and they are kept in a collection.

For example: String [] emails;

if we have two emails we want our VF page to display two of our custom VF components and we want to pass to them emails[0] and emails[1] to display.

 

Any help with this will be appreciated.

 

Kos

 

  • March 14, 2011
  • Like
  • 0

Hi,

We are using the SalesForce Console.

In the Console we show the Leads listview on the top and the selected Lead's detail view on the bottom.

So if you click a lead from the top list view that lead gets loaded below the list view in it's detail's view below it.

 

What we would like to do is:

Redirect the whole console page to another custom VisualForce page then from the other page redirect back to Console view but show the Console in the state it was before redirection.

For example:

1. Open the console do edit a lead in the bottom iframe.

2. After you save we have a small custom VisualForce page which redirects the whole console page to another page (PAGEVALIDATION) like this:

window.parent.parent.location ="PAGEVALIDATION URL"

3. Now what we want to do is have PAGEVALIDATION redirect back to the console but show the console in the same state as it was in step 1.

 

I appreciate any help with this.

 

Thanks,

Kos

 

  • January 26, 2011
  • Like
  • 0

Hi,

We have an application which monitors whether the user has edited something in the Leads detail page and pops up an HTML window with some data.

Because in SalesForce it is not possible to override the save button we have hacked that shortcoming by creating a Visual Force page which has a bit of JavaScript which can popup our HTML window based on whether our controller says that the Lead in question has been modified. So basically the user edits a lead hits save and we popup our window.

 

Now in our HTML window which pops up the user may change a value of the Lead he has just edited. To reflect that in the view we refresh the page with JavaScript  like this:

window.parent.location = "{!the parent url which the controller knows}"

 

Now the problem is when the detail view is seen in the salesforce console. In the console window.parent in our visualforce page gives us the iframe but because of cross-domain security we are not able to set the location property. We can do so on the parent like window.parent.parent.location = "{!the parent url which the controller knows}" but this is not what we want as this refreshes the whole console window and is lossing state.

 

We tried something differently I though if we put a button which does a post back on our Visual Force page and we hide the button but click it with JavaScript it will do a postback and it will refresh the iframe. That did not work. It only refreshed our Visual Force page.

Any help on how can we achieve our goals will be appreciated.

 

To reiterate the problems we are trying to solve:

   1. How can we popup something after the user has edited a record and then refresh the current page. => we partially solved that by creating a Visual Force page which does it and refreshes the page. This brought us to another problem in Console:

      1.1. How can we refresh just the iframe from a Visual Force page embedded in the layout of the Leads layout?

 

Any help on how to resolve either 1 or 1.1 will be appreciated.

 

Thanks,

Kos

  • January 26, 2011
  • Like
  • 0

Hi,

I have a before update and before insert trigger which for each records checks whether the record has modified its address and marks it as modified if yes.

The trigger works fine until a batch update of all records is performed in which case I get the following error:

 

System.LimitException: XXXX:Too many script statements: 12801

the question I have is how to either make the trigger to run in batch jobs but not throw that error OR how to disable the trigger in code (doing that manually is not an option) before the batch job is being run.

 

Thanks,

Kos

  • December 23, 2010
  • Like
  • 0

Hi guys,

We are developing a managed package which we would like to prepare for a security review.

In the package we have logic in a one VF page's controller which returns a PageReference object and redirects to another VF page. We want to be able to pass the record id from the first page to the second page and we are currently doing that by adding the id to the url as a parameter string.

We have a problem with security review with this approach. I wandered what would you recommend to make that more secure.Probably a session inside of SalesForce or encrypt the id or how?

 

Thanks,

Kos

  • December 02, 2010
  • Like
  • 0

Hi,

We have a managed package in which we have packaged:

Apex classes, custom fields, triggers to standard objects etc.

We would like to allow the users to decide whether they would like us to install the triggers to the standard objects or the custom fields during installation.

 

The process should be like the following:

 1. User clicks install package

  2. User is provided with a set of options like: Install triggers in Accounts [checkbox], Install triggers in Leads [checkbox]

  3. The user checks the Accounts checkbox and unchecks the Leads checkboxs and clicks continue.

  4. Our package installas only the triggers for the Accounts checkbox and not the Leads trigger.

 

Is that possible?

 

Thanks,

Kos

  • December 01, 2010
  • Like
  • 0

Hi guys,

I am developing a SalesForce composite application.

The application actually has a native part as well. The native part get installed as a managed package and will get assigned my org's prefix say: xxxx__ to all object.

Now the composite part (.Net solution) accesses the components without that prefix and it is all blown.

Is there a way to make the webservice be aware of the package prefix.

Currently I have a map of all my custom objects and fields and prepend the prefix but it does not seem the right way of doing things.

I have something like

 

if(objName.EndsWith("__c"))

{

   if(objName == "MycustmoColumn")

      || (objName == "MycutomObject")

return "xxx__" + objName;

}

 

Above I check if the objName that gets passed is any of my custom objects or fields and prepend my package.

Some may say why don't you just use the full object name with the package prefix? Well currently I have my package prefix in my release salesforce account only but I have other testing accounts where I do not have that and also I am not sure what my package prefix is going to be when the app is ready and actually released so I need some flexibility there.

 

Thanks,

Kos

  • October 30, 2010
  • Like
  • 0

Hi guys,

Can anybody explain how to do pagination or share some code on doing pagination in SalesForce.

 

I will discribe below what I have tried and what my thoughts are on what to try:

I tried to use the query batch size but that gets ignored.

Basically I tried something like the following pseudo code:

query = "SELECT [COLUMN_NAMES] FROM ACCOUNT"

pagesize = 50

 

queryREsult = querySalesForceTroughTheAPI(query,pagesize)   <- here I pass for batch size the pagesize

 

The problem is that here queryResult.records is 100 let say it ignored the batchsize that I passed.

So my second quess would be that I should cashe the results into a DataTable let say.

So I keep the last queryLocator and when the user moves next I check if I have enough records in the cached DataTable if not I do queryMore and add more records to the DataTable.

But in that case wouldn't the DataTable be able to become too large for large datasets?

 

Thanks,

Kos

  • October 24, 2010
  • Like
  • 0

Hi guys,

We have a composite application developed in ASP.Net.

We are showing the application within a salesforce tab and our application consists of a number of subtabs(3 altogether).

What we would like to achieve is to give the users the ability to control access to the tabs from within SalesForce.

 

The only way that I can come up with of achieving the desired functionality is to install two groups along with our application.

1- Our app users

2- Our app admins

When the user accesses our application we use the SalesForce API to check to which group the user is a member of. If the user is a member to "Our app users" group we do not show the admin section.

I am not sure if the above would work it is just theoretical for the moment.

 

Could you please let me know what the recommended way of doing that is?

It is very important that our solution does not look like a hack.

 

Thanks,

Kos

 

  • October 19, 2010
  • Like
  • 0

Hi,

We are developing a composite application in .Net MVC 2 ( the question is not .Net sepcific).

We have implemented single sign on as recommended and I would like to know how people delt with expired sessions.

For example if the user is taking say more than 30 minutes configuring something in our application and during that period we do not make any calls to SalesForce and finally after the 30 minutes the user is finally ready and hits a "save" button and we try to write some data in salesforce the session might have expired.

What is the best approach to check if the SalesForce session is live and to support it live and to take actions if it expired in the middle of something.

 

Thank you in advance for your answers.

 

Regards,

Kos

  • September 29, 2010
  • Like
  • 0

Hi,

We are doing email validation solution.

The solution has two implementations:

1. An after update trigger which is installed on the Lead objects so that when a lead is updated from an external forma (in Facebook for example) the trigger fires a future method which does a webservice call which validates the email and replaces the current email with the validated one.

2. We have an interactive part where when a user edits the Lead record from the user interface we popup a window with both the original email and the validated email and let the user choose which one he/she wants to leave.

 

Now the problem is when we install both solutions and the user edits a lead from the user interface. Then the email will be validated by both our interactive solution and the trigger.

What we need is a way for the trigger to find out that that lead was updated by the user interface and not fire.

Ideally we would not want to extend the lead with another field and having the user interface fill in that field we are looking for minimum to non intrusive solution to this if possible.

 

Thanks,

Kos

  • September 22, 2010
  • Like
  • 0

Hi guys,

I will be building a SalesForce application which will take records (Upton several hundred thousand) out of salesforce pass them to an external webservice which will process them and return the results, which will be stored back in SalesForce.

I am wandering on advantages and disadvantages for building the application in Apex and VisualForce on with .NET and be hosted outside of SalesForce.

I have come to the following at the moment:

Building in .NET

    Advantages:

          - Easier to develop, more popular, much better IDE, stepping through code 

          - Easier to support - since it is hosted on your server you have full control and you can turn on debugging features and collect debugging information very easily and quickly. And you can fix and replace the app easily and quickly.

          - Faster to process a lot of records - you can use the salesforce data loader to export a large number of records, then process them in batch and use the salesforce batch API to upload the results back in batch.

     Disadvantages:

          - User interface will not look exactly the same as it would look if you develop it with VisualForce although with a good designer I think it will get very very close.

 

Building in Apex and VisualForce:

     Advantages:

           - User interface will look very familiar to users.

           - Integrated security model provided by SalesForce.

 

     Disadvantages:

           - You need a trained person who knows appexchnage to develop it.

           - Boy would it be difficult and time consuming to develop it compared to developing with VS and .NET or Java let say.

           - Cannot figure out how discovering and fixing a bug after a release would be done easily.

 

I am not sure on the following:

If developed in Apex would I need to use the SalesForce API ?

If I can avoid it my app will be available for people with lower editions than Enterprise which is quite and advantage.

Also is it possible to build such an application without using the API which will make it available for wider range of users ?

For processing batch records which will be faster .NET processing or Apex ?

I tend to think that for batch processing .NET will be faster since I will be able to get all records as a batch and upload them back as a batch.

 

Please help me know what you think on the above.

 

I appreciate your ideas on the above.

 

Thanks,

Kostadin Mitev

  • August 29, 2010
  • Like
  • 0
Hi,
I have a requirement to be able to send emails from a trigger through gmail. Does anybody know how to do that?
I have already setup Email sending through Gmail, however one of the limitations is that Workflows and Apex triggers send emails from Salesforce and not through gmail.

Thanks!
  • August 01, 2018
  • Like
  • 0

hi, 

 

i created a form using the salesforce lead utility. 

This utility created a standard HTML form with action and method.

 

I have a ASP.NET project with masterpages. and in this case it is not possible to insert the html form in my page because then i will get a form in another form. 

 

I tried to make a asp button control with postbackurl but it doesn't seem to work.

 

Any advice?

 

Thx in advance

  • April 26, 2011
  • Like
  • 0

Hi all,

 

I want to make a web service call for which i have the end point URL and xml that need to be passed. I need to pass a POST variable. Can anyone please help me on how to pass a POST variable through HTTP Request.?

 

Thanx in Advance

Ray

 

 

I am completley new to Salesforce and I was given a snippet of html to integrate Salesforce into our existing website.  Our website however, is an ASP.net web CMS, hence I am unable to use the snippet due to multiple <form> tags.  What is the most advisable way to integrate Salesforce into a .Net application?   

 

Thanks,

Neil

  • April 18, 2011
  • Like
  • 0

Hi,

We need to be able to access the field names on a SalesForce page with javascript. For example when the user opens the Accounts page our javascript needs to be able to access the email field. When the user opens the Lead page our javascript needs to be able to access the email field on Leads.

 

Is there a way to detect what is the email's field id/name on Leads and Accounts and possibly the other SF pages.

 

Thanks,

Kzmp

  • March 16, 2011
  • Like
  • 0

Hi

This is more like two questions in one post.

We have a custom home page component on which we would like to use some AJAX to access external system (call an external web service) and Ajax to interacti with the SF database. And the javascript on that page must execute from the same domain as SF pages.

After a lot of struggling and trial and error. we figured out the following way:

1. Download the Connection.js API from SalesForce and upload it as a static resource.

2. Create a custom html home page component. Include the Connection.js <script type="text/javascript" src="/resource/QAS_NA_TEST__Connection"> write your html and javascript logic there and save it.

 

So far soo good the only problem is how would the Connection.js salesforce API get its session. After a lot of trial and error we decided to:

 

3. Create a custom links home page component. The custom link inside is is an "execute javascript" link and it has the following component:

 window.sessionIdTest = '{!GETSESSIONID()}';

 

4. Add an onload javascript event handler in the home page html component in step 1 above with the following body:

 

 var link = $("a:contains('Test link')");            link.attr('onclick',link.attr('href').replace('javascript&colon;','').replace('%28','(').replace('%29',')'));            link.trigger('click');            sforce.connection.sessionId = window.sessionIdTest; 

 

The idea is that when the home page loads our html home page component finds the custom link and clicks it. The custom link in turn sets the SF session to a global variable then the Home page component picks up that variable and initializes SF Ajax.

In that way we can call external Web services from our custom html home page component and we can access the SF database which is what we would like to achieve.

 

Finally the questions:

1.Would anybody suggest anything simpler to do this?

2. Would SalesForce certify this if it is going to be a part of a managed package sold to thid party customers?

 

Please note that making a VF page and adding that in an iframe to the custom html component is not a solution for us because it is absolutely essential for us that our javascript executes in the same domain as SF.

 

Thanks,

Kzmp

  • March 14, 2011
  • Like
  • 0

Hi,

We have designed 1 component which displays some basic informatin to the user let say emails.

We have a VF page on which we would like to show as many components of those as the number of emails that we have.

 

The page controller knows the number of emails and they are kept in a collection.

For example: String [] emails;

if we have two emails we want our VF page to display two of our custom VF components and we want to pass to them emails[0] and emails[1] to display.

 

Any help with this will be appreciated.

 

Kos

 

  • March 14, 2011
  • Like
  • 0

Hi,

We have an application which monitors whether the user has edited something in the Leads detail page and pops up an HTML window with some data.

Because in SalesForce it is not possible to override the save button we have hacked that shortcoming by creating a Visual Force page which has a bit of JavaScript which can popup our HTML window based on whether our controller says that the Lead in question has been modified. So basically the user edits a lead hits save and we popup our window.

 

Now in our HTML window which pops up the user may change a value of the Lead he has just edited. To reflect that in the view we refresh the page with JavaScript  like this:

window.parent.location = "{!the parent url which the controller knows}"

 

Now the problem is when the detail view is seen in the salesforce console. In the console window.parent in our visualforce page gives us the iframe but because of cross-domain security we are not able to set the location property. We can do so on the parent like window.parent.parent.location = "{!the parent url which the controller knows}" but this is not what we want as this refreshes the whole console window and is lossing state.

 

We tried something differently I though if we put a button which does a post back on our Visual Force page and we hide the button but click it with JavaScript it will do a postback and it will refresh the iframe. That did not work. It only refreshed our Visual Force page.

Any help on how can we achieve our goals will be appreciated.

 

To reiterate the problems we are trying to solve:

   1. How can we popup something after the user has edited a record and then refresh the current page. => we partially solved that by creating a Visual Force page which does it and refreshes the page. This brought us to another problem in Console:

      1.1. How can we refresh just the iframe from a Visual Force page embedded in the layout of the Leads layout?

 

Any help on how to resolve either 1 or 1.1 will be appreciated.

 

Thanks,

Kos

  • January 26, 2011
  • Like
  • 0

Hi,

I have a before update and before insert trigger which for each records checks whether the record has modified its address and marks it as modified if yes.

The trigger works fine until a batch update of all records is performed in which case I get the following error:

 

System.LimitException: XXXX:Too many script statements: 12801

the question I have is how to either make the trigger to run in batch jobs but not throw that error OR how to disable the trigger in code (doing that manually is not an option) before the batch job is being run.

 

Thanks,

Kos

  • December 23, 2010
  • Like
  • 0

Hi,

We have a managed package in which we have packaged:

Apex classes, custom fields, triggers to standard objects etc.

We would like to allow the users to decide whether they would like us to install the triggers to the standard objects or the custom fields during installation.

 

The process should be like the following:

 1. User clicks install package

  2. User is provided with a set of options like: Install triggers in Accounts [checkbox], Install triggers in Leads [checkbox]

  3. The user checks the Accounts checkbox and unchecks the Leads checkboxs and clicks continue.

  4. Our package installas only the triggers for the Accounts checkbox and not the Leads trigger.

 

Is that possible?

 

Thanks,

Kos

  • December 01, 2010
  • Like
  • 0

I am creating an AppExchange app which requires the user to follow a lengthy installation guide, adding new fields to page layouts, buttons, and setting up some security settings.   I am looking to automate these steps to make the installation as quick and painless as possible.

 

Is this something that can be accomplished via the API?  Can I add fields and buttons to page layouts via the API?  Or does anyone have a better idea of how to accomplish this?

 

thanks.

  • November 03, 2010
  • Like
  • 0

Hi guys,

I am developing a SalesForce composite application.

The application actually has a native part as well. The native part get installed as a managed package and will get assigned my org's prefix say: xxxx__ to all object.

Now the composite part (.Net solution) accesses the components without that prefix and it is all blown.

Is there a way to make the webservice be aware of the package prefix.

Currently I have a map of all my custom objects and fields and prepend the prefix but it does not seem the right way of doing things.

I have something like

 

if(objName.EndsWith("__c"))

{

   if(objName == "MycustmoColumn")

      || (objName == "MycutomObject")

return "xxx__" + objName;

}

 

Above I check if the objName that gets passed is any of my custom objects or fields and prepend my package.

Some may say why don't you just use the full object name with the package prefix? Well currently I have my package prefix in my release salesforce account only but I have other testing accounts where I do not have that and also I am not sure what my package prefix is going to be when the app is ready and actually released so I need some flexibility there.

 

Thanks,

Kos

  • October 30, 2010
  • Like
  • 0

Does anyone know how to use Bulk API in C#?

the Web Service API can only update max 200 records at once.

Bulk API can update 10,000 records at once.

I only find sample code using Java.

Thanks.

 

  • October 27, 2010
  • Like
  • 0

Hi guys,

We have a composite application developed in ASP.Net.

We are showing the application within a salesforce tab and our application consists of a number of subtabs(3 altogether).

What we would like to achieve is to give the users the ability to control access to the tabs from within SalesForce.

 

The only way that I can come up with of achieving the desired functionality is to install two groups along with our application.

1- Our app users

2- Our app admins

When the user accesses our application we use the SalesForce API to check to which group the user is a member of. If the user is a member to "Our app users" group we do not show the admin section.

I am not sure if the above would work it is just theoretical for the moment.

 

Could you please let me know what the recommended way of doing that is?

It is very important that our solution does not look like a hack.

 

Thanks,

Kos

 

  • October 19, 2010
  • Like
  • 0

Hi,

We are doing email validation solution.

The solution has two implementations:

1. An after update trigger which is installed on the Lead objects so that when a lead is updated from an external forma (in Facebook for example) the trigger fires a future method which does a webservice call which validates the email and replaces the current email with the validated one.

2. We have an interactive part where when a user edits the Lead record from the user interface we popup a window with both the original email and the validated email and let the user choose which one he/she wants to leave.

 

Now the problem is when we install both solutions and the user edits a lead from the user interface. Then the email will be validated by both our interactive solution and the trigger.

What we need is a way for the trigger to find out that that lead was updated by the user interface and not fire.

Ideally we would not want to extend the lead with another field and having the user interface fill in that field we are looking for minimum to non intrusive solution to this if possible.

 

Thanks,

Kos

  • September 22, 2010
  • Like
  • 0