• Eric Kintzer
  • NEWBIE
  • 24 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 16
    Replies
Hi need help in solving this.I'm on aSystem Admin profile and created a custom object. Now I want to change fieldlabel and api name of object. I'm able to change label but not the API name. Getting insufficient privileges error. I have view all modify all permissions for the object at profile too. Please help, I tried deleting the object too but i get same error  
Hi, I'm an admin and created a custom object x. I wanted to change API name of the object and i get insufficient privileges error. I created the object and i have view all modify all permissions as well but still i m unable to change api name. I even tried deleting the object i got the same error. I really needto change api name at very least any help would be appreciated!! Thanks in advance 
I've added all these line of code in the Save() method to try to satisfy the "Modify the save() function to implement CRUD/FLS check on the Name field of the Encrypt_Decrypt__c object." requirement but nothing seems to pass it's check.  Anyone else run into this or have any ideas?

        if (!Schema.sObjectType.EnCrypt_Decrypt__c.fields.Name.isCreateable()) { 
            return NULL; 
        }
        if (!Schema.sObjectType.EnCrypt_Decrypt__c.fields.Name.isUpdateable()) { 
            return NULL; 
        }        
        if (!Schema.sObjectType.EnCrypt_Decrypt__c.fields.Name.isAccessible()) { 
            return NULL; 
        }        

Thanks,
Deb
Hello sfdx gurus,
In Windows 7, I get the following error when I attampt to authorize the developer hub org. The login windows to DevHub opens up that lead to next error after I put my DevHub credential.
It works fine in Mac. 

Appreciate any input.


C:\Users\raip\sfdx\sfdx-dreamhouse>sfdx force:auth:web:login -d -a DevHub
ERROR running force:auth:web:login:  Command failed with response.
 - CylancePROTECT Script Control has blocked access to this PowerShell script.
.
Try this:
Determine why this command failed to get an encryption key for user raip: [C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy ByPass -File C:\Users\raip\AppData\Local\sfdx\plug
ins\node_modules\salesforce-alm\CredMan.ps1 -GetCred -Target sfdx -User local].
 
Hi all.

I tried to update an order using REST API. I received an Execution
{u'errorCode': u'ENTITY_IS_LOCKED', u'fields': [], u'message': u'entity is locked'}

Why are the Orders locked?
I don't have approval process in my salesfoce system.

Thanks in advance.

 
Hi All,

I have created an email service on opportunity,i got an email address for that email service as 'opportunity_mail@t-14g4wh9lxqs27f99urhsvnojcc6gufofjq3jbl394x9sjsxsdy.28-1ginoeas.ap2.apex.salesforce.com'.when i am adding this email address in Forwarding and POP/IMAP in gmail, i got a message saying ''confirmatio code is sent to opportunity_mail@t-14g4wh9lxqs27f99urhsvnojcc6gufofjq3jbl394x9sjsxsdy.28-1ginoeas.ap2.apex.salesforce.com".Now where can i get that confirmation code?
Hi all,

I'm stuck in the Apex Integration Services - Apex SOAP Callouts challenge with the following message "The Apex class 'ParkLocator' does not appear to be calling the SOAP endpoint.".

Could you please advise ?
I'm getting an error when checking the Using Visualforce Pages in Page Layouts and Mobile Cards challenge. The error says that the page isn't evaluating the 'Prospecting' stage, yet the code works when I insert an Opportunity Id where the Stage = Prospecting.

The code:
<apex:page docType="html-5.0" standardController="Opportunity">
    <style>
    </style>
    
    <apex:remoteObjects >
        <apex:remoteObjectModel name="Opportunity" fields="Id,StageName" />
    </apex:remoteObjects>
    
    <div class="myPage">
        <h2>Tip for when you're in the {!Opportunity.StageName} Stage:</h2>
        <p id="stageTip" />
    </div>
    
    <script>
        var opportunityStage = "{!Opportunity.StageName}";
        document.getElementById("stageTip").innerHTML = createStageTip();
        
        function createStageTip() {
            if(opportunityStage){
                switch(opportunityStage){
                    case "Prospecting":
                        return "You need to ask really good questions"
                        break;
                    case "Needs Analysis":
                        return "Determine the needs by asking really good questions"
                        break;
                    case "Proposal/Price Quote":
                        return "Make sure the price doesn't exceed the budget"
                        break;
                    case "Negotiation/Review":
                        return "Maybe go down, but don't go down too much"
                        break;
                    default:
                        return "Use your best judgement";
                }
            }
        }
    </script>
</apex:page>
If you have any ideas as to why this isn't working, I'd love to hear them.

Cheers,
Justin
 
  • December 07, 2015
  • Like
  • 1
I've created a Visualforce page that lists a bunch of interview time slots with a link for people to reserve them. One of the columns is showing a date/time field. Since it is a public visualforce page, the date/time field defaults to GMT.

I would like to have a picklist containing all the time zones (worldwide), where the user selects their time zone from the list and then the date/time column updates to show the times based on the newly selected time zone.

I have gotten as far as creating the apex class and vf page which almost does the trick for the current system time (which is not very far!). I figure it's a good first step, but need some help as I'm stuck. I'm struggling to get the picklist value to pass into the timezone part of the apex class. Any ideas?

Thanks

Apex Class
public class ConvertTimeZone { 
    public String YourTimeZone {get;set;}
    public String tzOptions {get;set;}
    public String YourInterviewTime{get;set;}
    
    public List<SelectOption> getTimeZoneOptions() {
        List<SelectOption> tzOptions = new List<SelectOption>();
        tzOptions.add(new SelectOption('GMT','Greenwich Mean Time'));
        tzOptions.add(new SelectOption('Australia/Sydney','Australian Eastern Daylight Time'));
        tzOptions.add(new SelectOption('Asia/Kolkata','India Standard Time'));
 
        return tzOptions;
    }
    
    public ConvertTimeZone() {
    DateTime temp = System.now();
    YourInterviewTime = temp.format('dd/MM/yyyy HH:mm a z', 'tzOptions'); 
    }
}

VF Page
<apex:page controller="ConvertTimeZone">

<apex:form >
    <apex:pageBlock title="Custom PickList Demo" id="out">
        
        <apex:pageBlockSection title="Custom Picklist Using selectList and selectOption" collapsible="false">
            <apex:actionRegion >
            <apex:selectList value="{!YourTimeZone}" multiselect="false" size="1">
                <apex:selectOptions value="{!TimeZoneOptions}"/>
            <apex:actionSupport event="onchange" rerender="yourtimezone" />
            </apex:selectList>
            </apex:actionRegion>
        <apex:actionRegion >
            <apex:outputText id="yourtimezone" value="{!YourTimeZone}" label="You have selected:"/>
        </apex:actionRegion>
        </apex:pageBlockSection>

        <apex:pageBlockSection >
        Resulting Time: <apex:actionRegion ><apex:outputText id="yourtimezone" value="{!YourInterviewTime}"/></apex:actionRegion>
        </apex:pageBlockSection>
    </apex:pageblock>
  </apex:form>
</apex:page>

 
  • April 23, 2015
  • Like
  • 0
Has anyone managed to produce pivot tables based on reports generated via Conga Composer on Excel? 

Hi Guys,

 

I have a dazzling issue when inserting a record triggered with After update trigger

bascially I want to create a child record when the user tick the complete box in the parent form.

 

I managed to do create the trigger, however the record gets created twice, after investigating the issue realised that I have a workflow update on the complete tick box Completed__c which set the complete date Completed_Date__c if the complete ticked Completed__c

 

The question is how can I keep the workflow and the trigger works in the same time without causing the trigger to create the same record twice

 

to understand my point more,  read point 11 in the below link

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_triggers_order_of_execution.htm

 

Thanks for your help in advance

 

 

//Below is the code for the trigger...
 
 
trigger setNewPoint_Penalty on Activity__c (before update) {

List <User_Points__c> newPoint = new List <User_Points__c> ();

isMinusValue MyNegClass = new isMinusValue ();

for (Activity__c a: trigger.new)
{
List <Activity__c> actLst = [SELECT Id, Name, CreatedDate, CreatedById, Assigned_To__c, Completed_Date__c, ActivityTypeId__c,
Completed__c, Cancelled__c, Required_Date__c, Cancelled_Date__c, Status__c, Details__c 
FROM Activity__c where id =: a.id];
List <User_Points__c> pointsExist = [SELECT Id, OwnerId, Points__c, Member__c, ProgressRel__c, Activity__c, Notes__c 
FROM User_Points__c
where Activity__c = : a.id ] ;


integer NegTotal = MyNegClass.penaltiy(actLst);

for (User_Points__c p: pointsExist)
{
if (p.Points__c > 0 && actLst.get(0).Completed__c && NegTotal <> 0)
{


newPoint.add (new User_Points__c (
 Activity__c = actLst.get(0).id
,Points__c = NegTotal // this is to minus 2 point as a penalty
, Member__c = actLst.get(0).Assigned_To__c
, ProgressRel__c = null 
) ); 

}
else
{
continue;
}

}
insert newPoint;
}

}
 

 

Hi ,

   As pe salesforce order of execution  Before After trigger fires twice, if a workflow field update is there after 1st fire.

 

Before After trigger

Workflow rule

 

Before After trigger

 

 

Thebeforeandaftertriggers fire one more time only if something needs to be updated.

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_triggers_order_of_execution.htm

 

 

I have written a trrigger on opportunity to create a task after update. Opportunity also has multiple field update on it.Bexcause of this this trigger is getting fired twice and inserting two tasks.

I wanna avoid insertion of second task, please suggest me a way out here

 

 

Thanks

Hello,

 

I have a trigger on Account and it is being called twice I am do not know how to figure this out.

 

Here is my trigger code

 

 

trigger AccUpdateRates on Account (before insert, before update) {
  for(Account a: Trigger. new){
    if(Trigger.isUpdate){
      Account beforeUpdate = System.Trigger.oldMap.get(a.Id);
       if(a.RecordTypeId == '012500000001LcY' && a.Termination_Date__c == null){
        }
     }
     if(Trigger.isInsert){
        if(a.RecordTypeId == '012500000001LcY' && a.product__c != null){
              AccList.add(a);
              prodIDs.add(a.product__c);
          }    
     }
    if(accList.size()>0)
      AccountUpdateRates.UpdateProductRates(AccList, ProdIDs);

   
   }


}

I see that I have Kugadd package installed and have similar trigger on account. 

   Trigger - AccountBeforeInsertBeforeUpdate - installed package Kugamon Account/Contact Sync

 

 

I put print statement in couple of place in my class that is being called from trigger. 

 

When I look at the debug log I see the following statement twice

16:05:48.163|CODE_UNIT_STARTED|[EXTERNAL]|01qP00000004GdG|AccUpdateRates on Account trigger event BeforeUpdate for [0015000000XLDub]

Any suggestions I can find what is my causing trigger to be called twice?

 

Thanks

Uma

Hi,

 

     I have a trigger on opportunity update which will update the opportunity line items  accordingly.

 

     Through the debug log I found the trigger is triggered twice, even though I specify it will only be triggered if there is a stage change from sA to sB. 

 

     From the discussion board, I found the reason is due to certain workflow rule did field update right after the trigger. But the funny thing is after the first firing, the previous stage of the opportunity is still considered as sA instead of sB, while the opportunity line items data did accumulated after the firing.

 

     In the end, the number of line items doubled.  Although I have ways to prevent the line items from the second round of accumulation, I am just curious how to deal with the second fire of trigger?

 

 

     Btw, I found the governer limit of SOQL in sandbox increased from 20 to 100! Good news!

 

 

Thanks,

Dawn

Message Edited by dawnzdy on 04-15-2009 12:23 PM