• t4runjain
  • NEWBIE
  • 10 Points
  • Member since 2015
  • Sr Salesforce Developer
  • Kandisa Technologies


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 4
    Replies
Hello,

I am trying to create Parent & Child records in single DML statement, I am able to do the same for most of the object, but I have a requirement to create Account and Task in single DML.

I am getting "Field is not writeable: Task.What" error message. Here is the code I am trying to do so:


Account accReference = new Account(
     Autodesk_CSN__c ='1322'//external id
);

Account acc = new Account(Name='test', Autodesk_CSN__c='1322');

Task task = new Task();
task.What = accReference, // here is the problem, not sure what would be the relationship field name to refer parent?
task.ActivityDate=Date.Today(),
task.Subject = 'Testing',
task.Priority = 'High',
task.OwnerId = UserInfo.getUserId();

Database.SaveResult[] results = Database.insert(new SObject[] { acc, task });

Any help would be appreciated.

Thanks,
Tarun
Hi,

We having integration with Authorize.net and we are implementing Accept.js to support credit card payments. The only issue is, it seems like in the API reference (http://developer.authorize.net/api/reference/features/acceptjs.html) there is no fields/method to take Customer's Billing Information and pass it to Authorize.net so the same will be available in transaction details.

Can any one help us i.e how to use Accept.js with asking Customer Billing Information as well?
 
My requirement is to create a page which should be accessible in Salesforce Lightning, Salesforce Classes & salesforce1 as well.

The page will have a couple of tables (data from custom object), and craeting new row, deleting row functionality.
Finally I need to save the data to custom object.
Also the table rows should be sortable(drag&drop).
The page shuld work as device independent (IPAD, Mobile, Desktop).

My question is what component should I use to create the page?
Should I use VF with Remote Methods?
Or should I use Lightning components to build the page?

Please let me know the best way to do it?
 
Hi Developers,

I have a trouble with, I have a VF Email Template, in that I have a BUY NOW button, on clocking on that, i need redirect to some another site with post parameters.

Please help me, wheather it is possible? if yes, than please let me know how can i do this.

I tried to give form in the vf email template also with some js code as well, but when email sends, it comment all the js code and remove anchor tag attributes,onlcik methods as well, and if I create a submit type button, its asking me a confirmation message, pelase help me how can we do this.

Thanks in Advance.
Hello,

I am trying to create Parent & Child records in single DML statement, I am able to do the same for most of the object, but I have a requirement to create Account and Task in single DML.

I am getting "Field is not writeable: Task.What" error message. Here is the code I am trying to do so:


Account accReference = new Account(
     Autodesk_CSN__c ='1322'//external id
);

Account acc = new Account(Name='test', Autodesk_CSN__c='1322');

Task task = new Task();
task.What = accReference, // here is the problem, not sure what would be the relationship field name to refer parent?
task.ActivityDate=Date.Today(),
task.Subject = 'Testing',
task.Priority = 'High',
task.OwnerId = UserInfo.getUserId();

Database.SaveResult[] results = Database.insert(new SObject[] { acc, task });

Any help would be appreciated.

Thanks,
Tarun
Hi,

We having integration with Authorize.net and we are implementing Accept.js to support credit card payments. The only issue is, it seems like in the API reference (http://developer.authorize.net/api/reference/features/acceptjs.html) there is no fields/method to take Customer's Billing Information and pass it to Authorize.net so the same will be available in transaction details.

Can any one help us i.e how to use Accept.js with asking Customer Billing Information as well?
 
I've got an Sobject collection variable in a flow, and I would like to display a list of values from the collection in a display text field.

If I use the varaible resource, it displays the IDs, along the lines of [Id1, Id2, Id3].

Is there any way to get the flow to produce something along the lines of:

Name1, Value1
Name2, Value2,
Name3, Value3,

in a display text field?

If not possible in the flow itself, I'm guessing if I embed the flow in a visualforce page I could pull it off, but would appreciate any tips on going about that.

Thanks

(Cross post from success: https://success.salesforce.com/answers?id=90630000000Cr4J)

Hi,

 

 Anybody explain am stuck to integrate salesforce with magento am passing parameters using http callout

this is my code am getting this response like :

 

oauth_problem=parameter_absent&oauth_parameters_absent=oauth_consumer_key

 

 

public void resp()
{
http H=new http();
HttpRequest req = new HttpRequest();
//String url= 'http://advaanz.com/magentoapitest/oauth/initiate';
req.setEndpoint('http://advaanz.com/magentoapitest/oauth/initiate');
//string Stringval='OAuth oauth_callback="'+EncodingUtil.urlEncode('https://c.ap1.visual.force.com/apex/megentoapi', 'UTF-8')+'",oauth_consumer_key="6nuzyesqo16saelvdazlodjvknurc2wh",oauth_consumer_secret="5fqgg8xrv9rvt88kz9o31bbe55zw6896"';

string Stringval='OAuth realm="http://advaanz.com/",oauth_consumer_key="6nuzyesqo16saelvdazlodjvknurc2wh",oauth_nonce="15ZN8FFR1700UQ6O",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1367319400",oauth_version="1.0",oauth_signature="4mphBg8VgYCV%2BeMIIMdZ%2BgD%2F6eM%3D"';
req.setMethod('POST');
req.setHeader('Content-length', '1753' );
req.setHeader('Content-Type', 'text/xml;charset=UTF-8');
string bVal=EncodingUtil.Base64Encode(blob.valueof(Stringval));
String authorizationHeader =bval;
req.setHeader('Authorization',bVal);
req.setbody('');
//req.setHeader('Accept','');
//req.setHeader('Host','api.magento.com');
req.setTimeout(50000);
HttpResponse res =h.send(req);
TestVal=res.getbody();
}

 

can any one explain how to integrate maganto using apex code?

 

Thankyou