• john he
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 8
    Replies

hi,

      I am a newbie on the mobile application development. what I want is to develop an App on iphone to let our business man approve the approval process.  

 

Firstly, the app will display a list of "item to approve" on the screen, and there is a button let say "approve" on each of the item. Secondly, when the uer click the button, then he can approve it.  

 

the challenge is that all the information is read from sfdc via the api (enterprise wsdl) also, the opperation is based on the api.  but as sfdc says, if you access sfdc via the third part application, you have to provide the token... it is not possible for the business man to record the security token when he login sfdc via the App.

 

      how much I am wrong on this? could anyone help?

 

      thanks!

I am developing the visualforce page for user to edit the record.  but I found that the BR() is converted to _BR_ENCODED_, which is absolutely not what I want.

 

here is the example to mimic the issue:

 

1. create a object  let's say MyObject

2. add one field "short description" type = Text Area

3. set the default value for the field as following:

a. Monday

        b. Sunday

        c. Saturday

    the formalu is like this: "a. Monday" & BR() & "b. Sunday" & BR() & "c. Saturday"

 

if you check the short description field on the salesforce standard page, it looks good.

 

but if you create a VF page to edit this field:

<apex:page standardController="MyObject__c">
<apex:form >
<apex:pageblock >
<apex:pageblockSection >
<apex:pageblockSectionItem >
<apex:outputLabel value="{!$ObjectType.MyObject__c.Fields.short_description__c.Label}"/>
<apex:inputField value="{!MyObject__c.short_description__c}"/>
</apex:pageblockSectionItem>
</apex:pageblockSection>
</apex:pageblock>
</apex:form>
</apex:page>

 

the BR() is converted into _BR_ENCODED_ and the whole default string is: 

a. Monday_BR_ENCODED_b. Sunday_BR_ENCODED_c. Saturday

 

terrible!

 

Could anyone help in this?  thanks!

 

John He

Sorry, I a new people on Visualforce page development.

 

when I develop visualforce page, I am confusing by the session binding syntax.

 

in the "AJAX Tookit Developer's Guide" book, I find an example on page 6, it puts the following code on the VF page:

<script type="text/javascript">
var __sfdcSessionId = '{!GETSESSIONID()}';
</script>

 

I believe, the above code is used to do the session binding.

 

But on the other hand, I find some VF page are use the following code to do the session binding:

sforce.connection.sessionId = "{!$Api.Session_ID}";

 

what is the different between the first approach and the second one?  could someone help on this?  many thanks!

I want to change the look and feel of salesforce pages. That mean, I want to use standard page layout but want to change the CSS of that standard page layout. But I couldn't find a way to access CSS for editing.

If anyone aware with this kind of problem, please help.

I am trying to piggy-back some functionality onto an Approval Process step. For example if the Related User for step 2 (ProcessInstanceWorkitem.ActorId?) is set to a certain user then i want to perform an additional function in the background. But only when that step is active. I can use the ProcessInstance table to find the ProcessInstanceId which i can then use to find the WorkItem whose ActorId field shows me the related user but I don't know what step in the approval process I am in. Is it step 2 or any other step?

 

How can I find what step of the approval process a record is in?

I'm trying to copy a new user as contact by using a trigger but I'm getting the following error

 

MIXED_DML_OPERATION, DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa): Contact, original object: User

 

trigger Acceleration_User_Copyto_Contact on User (after insert, after update) {
    
   // Map<String,User> newLead = new Map <String, User>();
    
    system.debug('Acceleration_User_Copyto_Contact Trigger....');
 
    for ( User user : System.Trigger.new)
    {
        if  (user.Email.contains('acceleration'))
        {
            system.debug('Acceleration_User_Copyto_Contact Trigger..2.');
            Integer RecordCount = [select count() from Contact c where c.Email = : user.Email];
            
            system.debug('Acceleration_User_Copyto_Contact Trigger..2a .' + RecordCount);
            
            if (RecordCount == 0)
            {
                String AccountId = '';
                for ( Account a : [Select a.Id From Account a where Name = 'Acceleration']) 
                {
                    system.debug('Acceleration_User_Copyto_Contact Trigger..3.');
                     
                    AccountId = a.Id;
                
                    Contact con = New Contact();
                    con.AccountId = AccountId ;
                    con.Email = user.Email;
                    con.Firstname = User.Firstname;
                    con.Lastname = User.Lastname ;
                    con.User__c = User.Id;
                    insert con;
                }          
            }                   
        }
        
     }
    
    
}

 

Hi,

I have a formula field named Contract End Date and the value of this field should be calucated based on Contract Start Date and the Contract Duration. Contract Start Date is of type Date and Contract Duration is the number of months. Id I just add both the fields it considers Contract Duration as number of days instead of month. How do I achieve this?

Thanks
Jina