• Anidev
  • NEWBIE
  • 20 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 23
    Questions
  • 24
    Replies
Hi Team,

I posted a comment on this question - https://developer.salesforce.com/forums/ForumsMain?id=9060G0000005ohuQAA
, however didn't get a response hence posting a question.
If you can please help with the .cmp and .js code.

Thanks in advance.
Ani
  • August 19, 2019
  • Like
  • 0
Hi All,

This is with respect to using multi languages and multi currency in salesforce.
Now we all know that for former the solution is enabling "Translation Workbench" and for latter  raising a case for enabling "Multi currency" feature.
However, my manager raised the following question :-
Can a "Customer Community" License user - on logging into a salesforce org see labels and records in a "language" and "currency" of his choice.
For e.g. in a  Org. Corporate Currency - USD
                           Default Language - English US
Multi currency and language translation enabled
For Customer Community User - Can he see "Currency" Values in - "EURO" 
                                                                 Record "Labels" in - "French"  
Kindly advice.
Many thanks in advance.

Regards,
Anidev 

 
  • October 24, 2014
  • Like
  • 0
Hi All,

This is with respect to "Topics" in "Chatter Feed".
I can insert a feed with # tag and that particular feed becomes a "Topic"
However, I am unable to query "Chatter Feed" for a particular "Topic".
Can some one please suggest a probable solution.
Please pardon if this is a basic query.

Many thanks in advance.

Regards,
Anidev 
Hi All,

This is with a basic doubt that i have:

// e.g. of custom controller as available on salesforce //

<apex:page controller="NewAndExistingController" tabstyle="Account">
    <apex:form>
        <apex:pageBlock mode="edit">
            <apex:pageMessages/>
            <apex:pageBlockSection>
                <apex:inputField value="{!Account.name}"/>
                <apex:inputField value="{!Account.phone}"/>
                <apex:inputField value="{!Account.industry}"/>
            </apex:pageBlockSection>
            <apex:pageBlockButtons location="bottom">
                <apex:commandButton value="Save" action="{!save}"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>


Now how do i get a page with above on say "opportunity" or "account" object as a "detail" page.

Kindly advice.

Many thanks in advance.

Regards,
Anidev
 
  • December 23, 2013
  • Like
  • 0

Hi All,

 

This is with respect to accessing opportunities on salesforce.

The "Opportunity" default access is private.

I have a profile non-sales which has only read access to opportunities as "CRUD" settings.

Now all opps are shared via "sharing settings" with above mentioned profile().

The sharing setting rule gives then (Read/Write) access.

But this is where my problem arises.

I want to give the non-sales users "edit" access,but only for certain specific fields.

However, if i make the sharing rule "Read Only" then they are not able to edit any field at all, while use of permission sets

makes no difference at all.

 

Kindly advice.

 

Many Thanks in advance.

 

Regards,

Anidev

 

  • September 02, 2013
  • Like
  • 0

Hi All,

 

This is with respect to displaying the multi currency feature in salesforce.

Just wanted to know if it is possible to reflect the exchange rate on a particular record.

E.g. i create an opportunity in USD, and my default currency is EUR.

So the user sees Amount as 500 USD (380 EUR) (exchange rate 1USD = 0.76 EUR).

As also,link it to dated currency so as to reflect current rate.

Hope i was clear in specifying my problem.

 

Kindly advice.

 

Many thanks in advance.

 

Regards,

Anidev

 

 

  • September 02, 2013
  • Like
  • 0

Hi All,

 

Following is my requirement :

 

i want to update Name field on a record with it's index value in salesforce.

For e.g Object A is the child of Object B :

 

Then before insert a trigger runs and checks number of records in the related list (object A) of Object B and puts that value as the serial number of that record.Now the problem is, when, i insert multiple records both get the same index number as both records are inserted at the same time.

So, if earlier to insert, count () was 2

Then 2 records are added so both  get the Name '4'

while it should be

'3' for the former and

'4' for the latter.

 

This is the code i have used for single record insert.

 

trigger updatecompland on ObjA__c (before insert) 
{
for (ObjA__c bp:trigger.new)
{
Set<Id> s1 = new Set<Id>();
s1.add(bp.ObjB__c);
Integer bpscount = [Select count() from ObjA__c where ObjB__c IN :s1] + 1 ;
string t1 = string.valueOf(bpscount);
bp.name = t1;
}
}

 

 

How to make it work for bulk inserts??

 

Please help!!!

 

Many thanks in advance.

 

Regards,

Anidev

 

 

P.S. - "after insert,after update" - triggers cannot be used as this field becomes"read only" after insert.

Please correct, if my understanding is incorrect

 

Hi All,

 

This is with respect to a lookup fields.


I want to create a functionality similar to "Related to" on "Tasks".I choose an object and the records in that object become available for selection/association.All through the same lookup field.

Any idea if it is possible, even a crude method would do.

 

Kindly advice.

 

Many thanks in advance.

 

Regards,

Anidev

 

 

  • April 29, 2013
  • Like
  • 0

Hi All,

 

This is with respect to dependent picklist on visual force.

I went through many of the post associated with this topic.

However, my problem is -

 

  1. the dependencies are not coming from fields on an object, rather neither are the main values themselves
  2. They are basically headers for linking to 'a particular'/or set of documents stored in libraries.
  3. I want to use them just as, logical arrangement of files.

E.g. i want a document - district map - then

 

main picklist - "Country "

dependent picklist - "State/County"

final picklist - "district" which will primarily be a link to the map stored in 'library'

 

Hope i was clear.

 

Kindly advice.

 

Many thanks in advance.

 

Regards,

Anidev

 

 

  • April 29, 2013
  • Like
  • 0

Hi All,

 

Could anyone please help with the error below:

 

trigger createminutes on Event (after insert, after update)
{
List<Event> elist = [select id,Meeting_Unique_No__c from Event where Meeting_Status__c='Closed'];
List<Minute__c> milist = [select id, Meeting_Unique_No__c from Minute__c];
Set<String> eSet = new Set<String>();
Set<String> miSet = new Set<String>();

//For(string s1:elist)
{
//eSet.put(s1);    
}
//For(string s2:milist)
{
//miSet.put(s2);
}
If(miSet.containsall(eSet))
{
System.debug('');
}
else
{
System.debug('Please create notes');
}
}

 

Many thanks in advance.

 

Regards,

Anidev

  • March 14, 2013
  • Like
  • 0

Hi All,

 

This is with respect to over all usage of a particular org.

The requirement is that i have to get records of "all modifications" done by "all users" after logging in.

It is similar to "setup audit trail", however we are extrapolating it to the complete instance and to all users and activity that they might have done.

For e.g. user A logged in at 19.00 hrs and edited "Account", etc ........

 

Hope i was able to articulate clearly.

 

Many thanks in advance,

 

Regards,

Anidev

  • March 09, 2013
  • Like
  • 0

Hi All,

 

Following is a code i have written to update value of a field (Test__c) on master object "Invoice" with value from child object "Mail" field (Signature__c)

 

/* Assumption - only one child per parent record */

 

------------------------------------------------ Code------------------------------------------------------

 

trigger InventoryItemRollup on Mail__c (after delete, after insert, after update) {
 
    Set<id> shipmentIds = new Set<id>();
    List<Mail__c> ma = new List<Mail__c>();
    List<Invoice__c> shipmentsToUpdate = new List<Invoice__c>();
    List<string> s = new List<string>();
    for (Mail__c m:ma)
    {
    s.add(m.Invoice__c);
    for(string s1:s)
    {
    for (Mail__c item : Trigger.new)
        shipmentIds.add(item.Invoice__c);
 
    if (Trigger.isUpdate || Trigger.isDelete) {
        for (Mail__c item : Trigger.old)
            shipmentIds.add(item.Invoice__c);
    }
 
    Map<id,Invoice__c> shipmentMap = new Map<id,Invoice__c>([select id, Test__c from Invoice__c where id=:s1]);
 
    for (Invoice__c ship : [select Id,Test__c,(select Id,Signature__c from Mails__r)from Invoice__c where Invoice__c =:s1]) {
       shipmentMap.get(ship.Id).Test__c = shipmentMap.get(ship.Id).Mails__r.Signature__c;
         shipmentsToUpdate.add(shipmentMap.get(ship.Invoice__c));
    
    }
    update shipmentsToUpdate;
 
}
}
}

 

 

---------------------------------------------------- Code -------------------------------------------------------------------

 

Above not working.

The error must be very basic.

Please pardon my naivety.

 

Thanks in advance,

Anidev

 

 

Ref: Code by Jeff Douglas on roll-ups

 

 

 

 

 

 

 

 

 

 

  • March 06, 2013
  • Like
  • 0

Hi All,

 

I am trying to create a roll- up between 2 objects - Object A (master) and Object B (child)

Now the problem is -

The lookup field (A) on a record of (B) becomes mandatory and i have to fill it up in all circumstance even if a particular case doesnot require so.

Can there be some work around wherein, such lookup field becomes optional ?

 

Many thanks in advance,

 

Ani

  • February 18, 2013
  • Like
  • 0

Hi All,

 

I have installed an app "Survey Force App" for one of our clients

However, I am able to solicit anonymous surveys only.

Need to attach them to respective contacts

 

In one of the reviews for this app i got  the following details:

 

"Once you have the survey working correctly(never did), you still need to connect an email service to move your questions to the contacts and back to SFDC

 

Can anyone please suggest what can be the way forward?

 

Many thanks in advance,

Ani

  • February 13, 2013
  • Like
  • 0

Hi All,

 

I have the following requirements:

 

  1. a trigger has to be written on the object - "Email Alert", is it possible?
  2. If possible, can i pass a certain "email template" value in the "Email Template" field ?
  3. If Yes, can i make it dynamic,i.e create/enable and delete/disable email alerts based on certain criterion ?

Many thanks in advance.

 

Regards

Ani

  • January 23, 2013
  • Like
  • 0

 

Hi All,

 

I have created 2 custom objects Opportunity and Opportunity Products.

Now i want them to work exactly in the way standard Opportunity and Opportunity Products work.

As i have understood i will have to create - multilineitem.jsp for same.

Can anyone advice if this is correct?

if yes, any source i could look up to achieve aforementioned,

if no, where could i lookup the exact answer.

 

Many thanks in advance,

Ani

  • November 22, 2012
  • Like
  • 0

Hi All,

 

We are setting up an instance on force.com edition for a client.
They have a website, where from they capture leads.
Now in normal course we could have captured above using web-to-lead form available in salesforce.
However,since this is a Force.com edition, we do not have access to "standard" object "lead",hence in a fix.
Kindly suggest a workaround,if possible.

 

Many thanks in advance

 

 

  • September 11, 2012
  • Like
  • 0

Hi All,

 

Just wanted to know if we can customise "Account" and "Contact" object on the "Force.com one app" edition.

Please suggest workaround,if not possible.

 

Many thanks in advance

  • September 11, 2012
  • Like
  • 0

Hi All,

 

Following is the error displayed when i use formula field in trigger:

Error: Compile Error: Field is not writeable: Potential__c.Contact_Status__c at line 5 column 4

 

trigger updatefield on Potential__c (after insert,after update)
{
for (Potential__c ptl:trigger.new)
{
if(ptl.Contact_Status__c='TRUE')
if(ptl.Opportunity_Stage__C!='CLOSED WON')

ptl.Opportunity_Stage__C='CLOSED WON';
}
}

 

Kindly advice as to what can be the error.

Many thanks in advance.

  • September 08, 2012
  • Like
  • 0

Hi All,

 

Following is the error, which is displaying when i am trying to install force.com in eclipse -

 

An error occurred while collecting items to be installed
session context was:(profile=epp.package.java, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Problems downloading artifact: osgi.bundle,com.salesforce.ide.api,25.0.0.201206181021.
MD5 hash is not as expected. Expected: cfe2af79a543696580b0dc8120ae63ea and found 6a6316e82af3bb7c590631bbaf86ece5.
Problems downloading artifact: osgi.bundle,com.salesforce.ide.core,25.0.0.201206181021.
MD5 hash is not as expected. Expected: 2850ffbb014faaf022bbb32f146ee699 and found a9ec6d0ec89ae775f36ab8cb9906c89b.
Problems downloading artifact: osgi.bundle,com.salesforce.ide.documentation,25.0.0.201206181021.
MD5 hash is not as expected. Expected: 314d2f02d4c7e63caaff7feff76dcd87 and found 9699663dabb960b3c4c2bf3319d26825.

 

 

Kindly advice as to waht could be the error.

 

Many thanks in advance 

 

Regards

Anidev

  • September 07, 2012
  • Like
  • 0
Hi Team,

I posted a comment on this question - https://developer.salesforce.com/forums/ForumsMain?id=9060G0000005ohuQAA
, however didn't get a response hence posting a question.
If you can please help with the .cmp and .js code.

Thanks in advance.
Ani
  • August 19, 2019
  • Like
  • 0
Good morning,

I have created a lightning component which runs a visual flow creating an Event record.

When the flow finishes I would like the page to be redirected to the created Event.

I have found a help topic with some example code but it would be great if someone could explain it ie. where would I add the created record id variable in my flow in this code so that it redirects?

https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_using_flow_onfinish.htm
 
handleStatusChange : function (component, event) {
   if(event.getParam("status") === "FINISHED") {
      var outputVariables = event.getParam("outputVariables");
      var outputVar;
      for(var i = 0; i < outputVariables.length; i++) {
         outputVar = outputVariables[i];
         if(outputVar.name === "redirect") {
            var urlEvent = $A.get("e.force:navigateToSObject");
            urlEvent.setParams({
               "recordId": outputVar.value,
               "isredirect": "true"
            });
            urlEvent.fire();
         }
      }
   }
}

Thank you
Hi All,

This is with respect to "Topics" in "Chatter Feed".
I can insert a feed with # tag and that particular feed becomes a "Topic"
However, I am unable to query "Chatter Feed" for a particular "Topic".
Can some one please suggest a probable solution.
Please pardon if this is a basic query.

Many thanks in advance.

Regards,
Anidev 
Hi All,

This is with a basic doubt that i have:

// e.g. of custom controller as available on salesforce //

<apex:page controller="NewAndExistingController" tabstyle="Account">
    <apex:form>
        <apex:pageBlock mode="edit">
            <apex:pageMessages/>
            <apex:pageBlockSection>
                <apex:inputField value="{!Account.name}"/>
                <apex:inputField value="{!Account.phone}"/>
                <apex:inputField value="{!Account.industry}"/>
            </apex:pageBlockSection>
            <apex:pageBlockButtons location="bottom">
                <apex:commandButton value="Save" action="{!save}"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>


Now how do i get a page with above on say "opportunity" or "account" object as a "detail" page.

Kindly advice.

Many thanks in advance.

Regards,
Anidev
 
  • December 23, 2013
  • Like
  • 0

Hi All,

 

This is with respect to accessing opportunities on salesforce.

The "Opportunity" default access is private.

I have a profile non-sales which has only read access to opportunities as "CRUD" settings.

Now all opps are shared via "sharing settings" with above mentioned profile().

The sharing setting rule gives then (Read/Write) access.

But this is where my problem arises.

I want to give the non-sales users "edit" access,but only for certain specific fields.

However, if i make the sharing rule "Read Only" then they are not able to edit any field at all, while use of permission sets

makes no difference at all.

 

Kindly advice.

 

Many Thanks in advance.

 

Regards,

Anidev

 

  • September 02, 2013
  • Like
  • 0

Hi All,

 

This is with respect to displaying the multi currency feature in salesforce.

Just wanted to know if it is possible to reflect the exchange rate on a particular record.

E.g. i create an opportunity in USD, and my default currency is EUR.

So the user sees Amount as 500 USD (380 EUR) (exchange rate 1USD = 0.76 EUR).

As also,link it to dated currency so as to reflect current rate.

Hope i was clear in specifying my problem.

 

Kindly advice.

 

Many thanks in advance.

 

Regards,

Anidev

 

 

  • September 02, 2013
  • Like
  • 0

Hi All,

 

Following is my requirement :

 

i want to update Name field on a record with it's index value in salesforce.

For e.g Object A is the child of Object B :

 

Then before insert a trigger runs and checks number of records in the related list (object A) of Object B and puts that value as the serial number of that record.Now the problem is, when, i insert multiple records both get the same index number as both records are inserted at the same time.

So, if earlier to insert, count () was 2

Then 2 records are added so both  get the Name '4'

while it should be

'3' for the former and

'4' for the latter.

 

This is the code i have used for single record insert.

 

trigger updatecompland on ObjA__c (before insert) 
{
for (ObjA__c bp:trigger.new)
{
Set<Id> s1 = new Set<Id>();
s1.add(bp.ObjB__c);
Integer bpscount = [Select count() from ObjA__c where ObjB__c IN :s1] + 1 ;
string t1 = string.valueOf(bpscount);
bp.name = t1;
}
}

 

 

How to make it work for bulk inserts??

 

Please help!!!

 

Many thanks in advance.

 

Regards,

Anidev

 

 

P.S. - "after insert,after update" - triggers cannot be used as this field becomes"read only" after insert.

Please correct, if my understanding is incorrect

 

Hi All,

 

This is with respect to a lookup fields.


I want to create a functionality similar to "Related to" on "Tasks".I choose an object and the records in that object become available for selection/association.All through the same lookup field.

Any idea if it is possible, even a crude method would do.

 

Kindly advice.

 

Many thanks in advance.

 

Regards,

Anidev

 

 

  • April 29, 2013
  • Like
  • 0

Hi All,

 

Could anyone please help with the error below:

 

trigger createminutes on Event (after insert, after update)
{
List<Event> elist = [select id,Meeting_Unique_No__c from Event where Meeting_Status__c='Closed'];
List<Minute__c> milist = [select id, Meeting_Unique_No__c from Minute__c];
Set<String> eSet = new Set<String>();
Set<String> miSet = new Set<String>();

//For(string s1:elist)
{
//eSet.put(s1);    
}
//For(string s2:milist)
{
//miSet.put(s2);
}
If(miSet.containsall(eSet))
{
System.debug('');
}
else
{
System.debug('Please create notes');
}
}

 

Many thanks in advance.

 

Regards,

Anidev

  • March 14, 2013
  • Like
  • 0

Hi All,

 

This is with respect to over all usage of a particular org.

The requirement is that i have to get records of "all modifications" done by "all users" after logging in.

It is similar to "setup audit trail", however we are extrapolating it to the complete instance and to all users and activity that they might have done.

For e.g. user A logged in at 19.00 hrs and edited "Account", etc ........

 

Hope i was able to articulate clearly.

 

Many thanks in advance,

 

Regards,

Anidev

  • March 09, 2013
  • Like
  • 0

Hi All,

 

I am trying to create a roll- up between 2 objects - Object A (master) and Object B (child)

Now the problem is -

The lookup field (A) on a record of (B) becomes mandatory and i have to fill it up in all circumstance even if a particular case doesnot require so.

Can there be some work around wherein, such lookup field becomes optional ?

 

Many thanks in advance,

 

Ani

  • February 18, 2013
  • Like
  • 0

Hi All,

 

I have installed an app "Survey Force App" for one of our clients

However, I am able to solicit anonymous surveys only.

Need to attach them to respective contacts

 

In one of the reviews for this app i got  the following details:

 

"Once you have the survey working correctly(never did), you still need to connect an email service to move your questions to the contacts and back to SFDC

 

Can anyone please suggest what can be the way forward?

 

Many thanks in advance,

Ani

  • February 13, 2013
  • Like
  • 0

Hi All,

 

I have the following requirements:

 

  1. a trigger has to be written on the object - "Email Alert", is it possible?
  2. If possible, can i pass a certain "email template" value in the "Email Template" field ?
  3. If Yes, can i make it dynamic,i.e create/enable and delete/disable email alerts based on certain criterion ?

Many thanks in advance.

 

Regards

Ani

  • January 23, 2013
  • Like
  • 0

 

Hi All,

 

I have created 2 custom objects Opportunity and Opportunity Products.

Now i want them to work exactly in the way standard Opportunity and Opportunity Products work.

As i have understood i will have to create - multilineitem.jsp for same.

Can anyone advice if this is correct?

if yes, any source i could look up to achieve aforementioned,

if no, where could i lookup the exact answer.

 

Many thanks in advance,

Ani

  • November 22, 2012
  • Like
  • 0

After a lot of persistence I finally was able to get repeating header and footers when rendering a Visualforce page as a PDF. The key to this is the page2PDF support of CSS3. 

 

Here is the css I came up with:

 

<style type="text/css">

@page {

@top-center {

content: element(header);

}

}

div.header {

padding: 10px;

position: running(header);

}

</style>

 

In the visualforce page I have the header setup as a div with the class name "header" the position running command pulls the content in my div and repeats it at the top of every page. The key for some reason is to put your header and footer divs at the top before you put your content on the page.

 

Here is my page

 

<apex:page renderAs="pdf">

<head>

<style type="text/css" media="print">

@page {

@top-center {

content: element(header);

}

@bottom-left {

  content: element(footer);

}

}

 

div.header {

padding: 10px;

position: running(header);

}

div.footer {

display: block;

padding: 5px;

position: running(footer);

}

 

.pagenumber:before {

content: counter(page);

}

.pagecount:before {

content: counter(pages);

}

</style>

</head>

 

<div class="header">

<div>My Header Text</div>

</div>

 

<div class="footer">

<div>Page <span class="pagenumber"/> of <span class="pagecount"/></div>

</div>

 

<div class="content">

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum nec nulla turpis. Suspendisse eget risus sit amet lectus ornare varius. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean nec urna purus, adipiscing accumsan massa. Nullam in justo nulla, sed placerat mauris. In ut nunc eget libero posuere luctus. Donec vulputate sollicitudin ultrices. Nulla facilisi. Mauris in sapien arcu. Phasellus sit amet quam non mi ornare tincidunt ac quis lectus.</p>

</div>

</apex:page>

 

I cut the content text short for the purpose of this post. I am sure it will just take some more playing around.

 

Hope this helps someone avoid some late nights like I spent trying to figure this out. :smileyhappy:

 

 

Message Edited by JohnDS on 03-10-2010 07:34 PM